2014-01-01

jQuery - Load js file programmatically

$.getScript( "assets/file.js" )
.done(function( script, textStatus ) {
console.log( 'textStatus: [' + textStatus + ']' );
})
.fail(function( jqxhr, settings, exception ) {
console.log( "Triggered ajaxError handler." );
})
;

No comments:

Post a Comment