document.writeln() causing jquery to flush all selection ability
<p>I have a third party script which uses the <code>document.writeln()</code> function. This is causing jQuery to completely lose all selection abilities. Here's a brief example of the code:</p>

<pre><code>(function () {
    //&lt;![CDATA[
    var DID = 186993;
    var pcheck = (window.location.protocol == "https:") ? "https://sniff.visistat.com/live.js" : "http://stats.visistat.com/live.js";
    document.writeln('&lt;scr' + 'ipt src="' + '' + '" type="text\/javascript"&gt;&lt;\/scr' + 'ipt&gt;');
    //]]&gt;
})();
</code></pre>

<p>While I step through this code, I'll have a watch on <code>$("body").length</code> which returns 1. After I step through the <code>document.writeln()</code> function, <code>$("body").length</code> immediately turns to 0. Anybody know the cause for this? Or perhaps a workaround?</p>
