Skip to content

Instantly share code, notes, and snippets.

@luciferous
Created October 6, 2011 17:24
Show Gist options
  • Save luciferous/1268014 to your computer and use it in GitHub Desktop.
Save luciferous/1268014 to your computer and use it in GitHub Desktop.
Testing dynamic JS load
Foo = {};
Foo.hi = function() { alert("hi") };
var head = document.getElementsByTagName("head")[0];
var script = document.createElement("script");
script.type = "text/javascript";
script.src = "http://gist.github.com/raw/1268014/lib.js";
head.appendChild(script);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment