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