title: jQuery load external JavaScript with $(document).ready fails
body: <p>I would like to load an external HTML. In addition, the external HTML contains some JavaScript code. Since the load function does not load this script, I have to use getScript:</p>
  
  <pre><code>&lt;div id="external-content"&gt;&lt;/div&gt;
  
  &lt;script type="text/javascript"&gt;
    $("#external-content").load("external.html #myid", function() {
      // do something
    });
    $.getScript("external.js");
  &lt;/script&gt;
  </code></pre>
  
  <p>That works like a charm unless the external.js has a $(document).ready command, which tries to access elements from external.html. It seems to me, that the event is fired too early. I also tried to put the command $.getScript("external.js"); into the .load callback, but did not succeed. Note that sing external.html separately and including the external.js directly works like expected.</p>