I need to load JavaScript code (which I don\'t have control over) from a URL into a div. The JavaScript code is a bunch of document.write() statements. Once the document.write()
You should see the jQuery.getScript() function.
Here is from the doc's example:
$.getScript('ajax/test.js', function(data, textStatus){ console.log(data); //data returned console.log(textStatus); //success console.log('Load was performed.'); });