How do I load a variable number of scripts with jQuery.getScript() before running javascript code? -


i need load variable number of javascript source files before running javascript code depends on them. 1 script needs loaded, other times 2. getscript() method allows 1 script loaded - how use load x number of scripts before running inner code?

$.getscript("test.js", function(){     // code run after script loaded });

what need:

$.getscript(new array("1.js","2.js"), function(){     // code run after scripts loaded });

thanks

i suggest labjs

that purpose is.


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -