javascript - Include a JS file using jQuery and wait till it loaded -



javascript - Include a JS file using jQuery and wait till it loaded -

this question has reply here:

how synchronously load script directory via ajax call? 2 answers

i want include scripts @ runtime , browser has wait till script loads or dependency resolves.

try

$.when( $.getscript( "sample.js" ), $.getscript( "simple.js" ), $.getscript( "jquery.js" ), $.deferred(function( deferred ){ $( deferred.resolve ); }) ).done(function(){ //place code here, scripts loaded });

javascript jquery

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -