Skip to content

Instantly share code, notes, and snippets.

@ginsterbusch
Last active August 29, 2015 14:04
Show Gist options
  • Save ginsterbusch/65b8b9b6aac771d6614a to your computer and use it in GitHub Desktop.
Save ginsterbusch/65b8b9b6aac771d6614a to your computer and use it in GitHub Desktop.
Example for loading external scripts using HeadJS
/**
* load the CDN version of History.js (@link https://github.com/browserstate/history.js/)
*/
if( typeof head.js != 'undefined') {
head.js('//cdnjs.cloudflare.com/ajax/libs/history.js/1.8/bundled-uncompressed/html4+html5/native.history.js', function() {
if( typeof History != 'undefined' ) {
console.info('history.js loaded');
}
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment