title: javascript stops working after link_to in rails 4
body: <p>I have a java script function that allow me to drag divs in my application.js</p>
  
  <pre><code>  $(function() {
      $( ".draggable" ).draggable();
    });
  </code></pre>
  
  <p>in my index file I have a bunch of divs with a draggable class, </p>
  
  <pre><code>    &lt;head&gt;
      &lt;script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"&gt;&lt;/script&gt;
      &lt;/head&gt;
  
  &lt;div class="draggable"&gt;    
    &lt;p&gt;&lt;strong&gt;Title:&lt;/strong&gt;
    &lt;%= task.title %&gt;&lt;/p&gt;
    &lt;p&gt; &lt;%= link_to 'Show', task, :class =&gt; 'text' %&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>In addition each div also have a show option that allows me to go to a another page, the other pages have a back button that allow me to go back to my index page.</p>
  
  <pre><code>&lt;%= link_to 'Back', tasks_url, :class =&gt; 'text' %&gt;
  </code></pre>
  
  <p>but when I am going back to that page I can no longer drag the divs. If I refresh the page I can than drag the divs again. </p>
  
  <p>is it a pipeline issue that I am not aware of ?</p>