Answers for "include multiple js files using jQuery $.getScript()"

1

include multiple js files using jQuery $.getScript()

$.when(
    $.getScript( "/mypath/myscript1.js" ),
    $.getScript( "/mypath/myscript2.js" ),
    $.getScript( "/mypath/myscript3.js" ),
    $.Deferred(function( deferred ){
        $( deferred.resolve );
    })
).done(function(){
    
    //place your code here, the scripts are all loaded
    
});
Posted by: Guest on November-30-2020

Code answers related to "include multiple js files using jQuery $.getScript()"

Code answers related to "Javascript"

Browse Popular Code Answers by Language