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()
$.getScript('foo.js', function() { alert('foo.js was loaded, do something cool now'); });