title: How can I load jQuery if it is not already loaded?
body: <p>I have a <strong>initializor.js</strong> that contains the following:</p>
  
  <pre><code>if(typeof jQuery=='undefined')
  {
      var headTag = document.getElementsByTagName("head")[0];
      var jqTag = document.createElement('script');
      jqTag.type = 'text/javascript';
      jqTag.src = 'jquery.js';
      headTag.appendChild(jqTag);
  }
  </code></pre>
  
  <p>I am then including that file somewhere on another page. The code checks if jQuery is loaded, and if it isn't, adds it to the Head tag.</p>
  
  <p>However, jQuery is not initializing, because in my main document, I have a few events declared just to test this. I also tried writing some jQuery code below the check, and Firebug said:</p>
  
  <blockquote>
    <p>"jQuery is undefined". </p>
  </blockquote>
  
  <p>Is there a way to do this? Firebug shows the jquery inclusion tag within the head tag!</p>
  
  <p>Also, can I dynamically add code into the <code>$(document).ready()</code> event? Or wouldn't it be necessary just to add some Click events to a few elements?</p>