Skip to content

Instantly share code, notes, and snippets.

@thomasjao
Created January 29, 2015 16:02
Show Gist options
  • Save thomasjao/2d21a0059c626f920f35 to your computer and use it in GitHub Desktop.
Save thomasjao/2d21a0059c626f920f35 to your computer and use it in GitHub Desktop.
Dynamically Add Script Using JavaScript Code
var script = document.createElement('script');
script.setAttribute('src', 'https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js');
document.getElementsByTagName('head')[0].appendChild( script );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment