title: How important it is to wrap jquery code in $(document).ready() function?
body: <p>I have been developing my frontend code with jQuery for a while now, and since I am implementing the site with partials in rails. Often I would use <code>content_for :javascript</code> to wrap up some code that is specific for a view. </p>
  
  <p>and my question is, I end up with a lot of script tags and since most of them are jquery code, I have typed up a lot of <code>$(document).ready(function() {});</code> </p>
  
  <p>So my question is, whether it is necessary to wrap everything in document.ready, and if I have too many of <code>document.ready</code> will it affect the performance?</p>