title: Is $(document).ready necessary if I put all my JavaScript at the bottom of the page?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/4643990/jquery-is-document-ready-necessary">jquery - Is $(document).ready necessary?</a>  </p>
  </blockquote>
  
  
  
  <p>Putting the JS just above the <code>&lt;/body&gt;</code> tag improves perceived load time because the browser doesn't have to read and parse through all the JS before it can start rendering the page.</p>
  
  <p>But it has another benefit, doesn't it? We don't need to wrap the JS in <code>$(document).ready(function() { ... })</code> because all the elements are already above the JS and thus are ready for manipulation.</p>
  
  <ol>
  <li><p>Is <code>$(document).ready</code> necessary to ensure the DOM has fully loaded and is ready for manipulation?</p></li>
  <li><p>Is there any difference between the execution times? Would one method fire faster than the other?</p></li>
  <li><p>Could we link our external JS files (<code>&lt;script src="..." /&gt;</code>) at the bottom of the page too then, or does that need to be in the header?</p></li>
  </ol>