title: How to make sure $(document).ready run after jQuery.js is available?
body: <p>In some cases, because of download speed or other async issue, even I put <code>$(document).ready()</code> after including jquery.js, from time to time, I will get complains about <code>$</code> is <code>undefined</code>.  blah blah blah.</p>
  
  <p>I don't want to do that:</p>
  
  <pre><code>setTimeout(function() {$(document).ready()... }, 1000);
  </code></pre>
  
  <p>that seems very lame.</p>
  
  <p>so, is there a smart way or proper way or good way to ensure document.ready is really ready to be called?  :)  </p>