Friday, 12 September 2008

Dynamic loading of javascript

I have been working on dynamic script loading with jquery and have this working

$.requireScripts(
new Array(
"/script/ui.core.min.js",
"/script/ui.draggable.min.js",
"/script/ui.resizable.min.js",
"/script/ui.dialog.min.js"), function(){
showADialog();
});

This will load the javascript specified in the first parameter before executing the function supplied as a second paramater.

No comments: