title: After running rake assets:precompile jquery hide/show snippet breaks
body: <p>I have developed all my code in development using jquery. In custom.js i have the following code that executes when a link is clicked to show content and then click again to hide the content</p>
  
  <pre><code>$(document).ready(function () {
      $('.new_home').hide();
  
      $('.new_home_link').click(function () {
          $('.new_home').toggle(400);
      });
  });
  </code></pre>
  
  <p>Everthing was working perfectly until i ran the command rake assets:precompile. Now, when i click the link it shows the content and hides it immediately thereafter without any second click. Any thoughts? thanks</p>
  
  <p><b>EDIT</b></p>
  
  <p><b>Application.js</b></p>
  
  <pre><code>//= require jquery
  //= require jquery_ujs
  //= require custom
  //= require_tree .
  </code></pre>
  
  <p><b>application.html.erb</b></p>
  
  <pre><code>&lt;%= javascript_include_tag "application" %&gt;
  </code></pre>
  
  <p><b>Generated HTML</b></p>
  
  <pre><code>&lt;script src="/assets/jquery.js?body=1" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script src="/assets/jquery_ujs.js?body=1" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script src="/assets/custom.js?body=1" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script src="/assets/users.js?body=1" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script src="/assets/application.js?body=1" type="text/javascript"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>I have also tried running "rake assets:precompile RAILS_ENV=development" and still it does not work, not sure what to do.</p>