I\'m dynamically loading jQuery
and jQuery UI
into a page, and I need to know when jQuery UI
has successfully extended jQuery
I used this code on some project to ensure that some scripts run sequentially. It did not work on IE (and I didn't have time to debug), but worked fine on everything else.
var node = document.createElement("script");
$.extend(node, {
type: 'text/javascript',
charset: 'utf-8',
async: false,
defer: true,
src: /*...*/
});
$(node).bind('load', loadedCallback);
$('head')[0].appendChild(node);