Skip to content

Instantly share code, notes, and snippets.

@yantze
Created February 16, 2016 03:08
Show Gist options
  • Save yantze/c9819b773b0f1f838537 to your computer and use it in GitHub Desktop.
Save yantze/c9819b773b0f1f838537 to your computer and use it in GitHub Desktop.
function addScript( src,callback) {
var s = document.createElement( 'script' );
s.setAttribute( 'src', src );
s.onload=callback;
document.body.appendChild( s );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment