Last active
August 29, 2015 14:04
-
-
Save ginsterbusch/ba304b2517de0b49a6b2 to your computer and use it in GitHub Desktop.
Example for loading external scripts using jQuery
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if( typeof jQuery != 'undefined' ) { | |
jQuery.getScript( '//cdnjs.cloudflare.com/ajax/libs/history.js/1.8/bundled-uncompressed/html4+html5/jquery.history.js' ).done(function( script, textStatus ) { | |
console.info( 'successfully loaded History.js'); | |
if( typeof History != 'undefined') { | |
console.log( 'ready to use History.js') | |
} | |
}).fail(function( jqxhr, settings, exception ) { | |
console.error('failed to load History.js') | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment