How to add Javascript code using jQuery and setTimeout()
<p>I have some tracking code that the provider (WebTraxs) says should be placed at the bottom of the  tag.  The problem is that this same code is causing everything on the page (including my jQuery code) to run AFTER the WebTraxs is executed.  This execution sometimes takes long enough where images rollovers, etc aren't working because the user is mousing over images before WebTraxs has finished.</p>

<p>Therefore, I'm trying to add the needed  tags (from WebTraxs) to the body after the page is loading in the document ready handler, using the following:</p>

<pre><code> setTimeout(function(){

  var daScript = '&lt;script language="JavaScript" type="text/javascript" src="/Scripts/webtraxs.js" /&gt;';
  var daOtherScript = '&lt;noscript&gt;&lt;img alt="" src="http://db2.webtraxs.com/webtraxs.php?id=company&amp;st=img" /&gt;';

  $('body').append(daScript);
  $('body').append(daOtherScript);

 },  
 5000);
</code></pre>

<p>I have two problems with the above:  </p>

<ol>
<li>In Firefox, after 5 seconds, it page goes completely blank.</li>
<li>In IE, there's no errors thrown, but normally you can see the WebTraxs code trying to load a tracking image in the status bar.  This is not occurring with the above code.</li>
</ol>

<p>Is there a better way to accomplish my objective here?  I'm basically just trying to make sure the WebTraxs code is executed AFTER the document ready handler is executed.</p>
