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
Post a Comment