Skip to content

Instantly share code, notes, and snippets.

@navneetkumar
Created September 14, 2013 12:23
Show Gist options
  • Save navneetkumar/6561606 to your computer and use it in GitHub Desktop.
Save navneetkumar/6561606 to your computer and use it in GitHub Desktop.
Load javascript dynamically
function loadFile(url) {
var script = document.createElement('SCRIPT');
script.src = url
document.getElementsByTagName('HEAD')[0].appendChild(script);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment