Note that there are some explanatory texts on larger screens.

plurals
  1. POAdd This Integration With rails turbolinks
    primarykey
    data
    text
    <p>I am trying to integrate <a href="http://www.addthis.com" rel="nofollow">addthis</a> (smartlayers) js to my rails 4 application</p> <p>i added the code on two pages eg(show template, edit template)</p> <p>when i navigate from one page to another page using the links i cannot see the icons working</p> <p>when i refresh the page i can able to see the icons. and i googled and i found out on rails the pages use turbolinks to navigate. </p> <p>i have tried the solutions from <a href="https://github.com/rails/turbolinks/issues/262" rel="nofollow">this</a> but can't solve it.</p> <p>Here is my edit template</p> <pre><code> &lt;h1&gt;Editing product&lt;/h1&gt; &lt;%= render 'form' %&gt; &lt;%= link_to 'Show', @product %&gt; | &lt;%= link_to 'Back', products_path %&gt; &lt;!-- Go to http://www.addthis.com/get/smart-layers to customize --&gt; &lt;script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-5270a69567915956"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; addthis.layers(); &lt;/script&gt; &lt;!-- AddThis Smart Layers END --&gt; &lt;!-- AddThis Button END --&gt; </code></pre> <p>and my show template</p> <pre><code>&lt;p id="notice"&gt;&lt;%= notice %&gt;&lt;/p&gt; &lt;p&gt; &lt;%= image_tag @product.photo.url(:medium) %&gt; &lt;/p&gt; &lt;p&gt; &lt;strong&gt;Title:&lt;/strong&gt; &lt;%= @product.title %&gt; &lt;/p&gt; &lt;p&gt; &lt;strong&gt;Sku:&lt;/strong&gt; &lt;%= @product.sku %&gt; &lt;/p&gt; &lt;p&gt; &lt;strong&gt;Description:&lt;/strong&gt; &lt;%= @product.description %&gt; &lt;/p&gt; &lt;p&gt; &lt;strong&gt;Price:&lt;/strong&gt; &lt;%= @product.price %&gt; &lt;/p&gt; &lt;%= button_to 'Add to cart', line_items_path(:product_id =&gt; @product), :class =&gt;"btn btn-success" %&gt; &lt;%= link_to 'Edit', edit_product_path(@product) %&gt; | &lt;%= link_to 'Back', products_path %&gt; &lt;!-- AddThis Smart Layers BEGIN --&gt; &lt;!-- Go to http://www.addthis.com/get/smart-layers to customize --&gt; &lt;script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-5270a69567915956"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; addthis.layers(); &lt;/script&gt; &lt;!-- AddThis Smart Layers END --&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload