Even though it's incredibly bad practice, most advertising servers still use document.write. It's terrible because placing
I'm trying to move the script tag to the very bottom of the page (so at least everything above it loads), but then I need a way to have everything it outputs written to a specific place (preferably with jQuery selectors).
If I were to just do
$('#foo').append(string) then that would work fine if the string only consists of HTML. But jQuery does something funky in the html() or append() functions when script tags are involved, and nothing is outputted.
Unfortuantely, I found it mangling the output more often than not. so I'm looking for other alternatives.