title: jQuery inserting a page into div breaks javascript
body: <p>My index.php has a jquery ajax call that inserts getposts.php into my #content div. This works fine.. The problem is that getposts.php has some javascript (more jQuery) in it and while Chrome does execute the code fine, Firefox doesn't.</p>
  
  <p>If I include the javascript as a file (setchecked.js) firebug is looking for setchecked.js_=1322020697832 </p>
  
  <p>If I include the javascript directly into getposts.php, the javascript is completely ignored (it doesn't even show up in the source code) </p>
  
  <p>Does anyone know why and how to fix it?</p>
  
  <p>index.php</p>
  
  <pre><code>&lt;script type="text/javascript" src="fetchposts.js"&gt;&lt;/script&gt;
  &lt;div id="content"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>fetchposts.js</p>
  
  <pre><code>$(document).ready(function() {
  $.ajax({
      url: 'getposts.php',
      type: 'POST',
      success: function (fetched) {
          $('#content').load('getposts.php');
      },
  });
  });
  </code></pre>
  
  <p>getposts.php (this makes firebug look for setchecked.js_=1322020697832 </p>
  
  <pre><code>&lt;script type="text/javascript" src="setchecked.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>or getposts.php (the javascript is completely absent from the source code)</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  $(document).ready(function() {
  // set $checked values
  $.ajax({
      url: 'query.php',
      type: 'POST',
      contentType: "application/json; charset=utf-8",
      dataType: "json",
      async: true,
      cache: false,
      success: function (msg) {
          ------ do some fun stuff that works --------
      },
  });
  });
  &lt;/script&gt;
           --------------- some php and html that DOES display -------------
  </code></pre>
  
  <p>Again, my problem isn't the content of my javascript, but how to get the javascript to work within the #content. Chrome does execute the code without problem. For some reason, it is firefox being picky. Firebug reports no errors, other than looking for the wrong file or completely ignoring it.</p>
  
  <p>The rest of getposts.php (the html and php code) DOES display inside my #content in both Chrome and Firefox.</p>