Skip to content

Instantly share code, notes, and snippets.

@abiank
Created July 11, 2013 23:17
Show Gist options
  • Save abiank/5980170 to your computer and use it in GitHub Desktop.
Save abiank/5980170 to your computer and use it in GitHub Desktop.
loadscript.js
function loadScript(sScriptSrc, oCallback) {
var oHead = document.getElementById('head')[0];
var oScript = document.createElement('script');
oScript.type = 'text/javascript';
oScript.src = sScriptSrc;
oScript.onload = oCallback;
oHead.appendChild(oScript);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment