title: scripting adds with document.write vs. jQuery append
body: <p>I have taken time to review many of the discussions on this topic but have not found an answer to my question.</p>
  
  <p>In my site I am trying to optimize my page load speed and one of the ways I would like to do that is to move the my ad scripts to the bottom of the page to allow my content to load first. I still want the ad to show up in the middle of the page.</p>
  
  <p>the ad code currently is in a script block in the middle of the page and looks something like this</p>
  
  <pre><code>&lt;div id="topAd"&gt;
    &lt;script&gt;
  
    document.write('&lt;s' + 'cript lang' + 'uage="jav' + 'ascript" src="' + src + '"&gt;&lt;/' + 'scr' + 'ipt&gt;');
    &lt;/script&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>what I would like to do is something like this at the bottom of the page</p>
  
  <pre><code>&lt;script&gt;
    var script = document.createElement('script');
    script.src = src;
    jQuery('#topAd').append(script);
  &lt;/script&gt;
  </code></pre>
  
  <p>Unfortunately this always loads the content at the bottom of the page and not inside the "topAd" div. Can anyone explain why this is happening?</p>