Skip to content

Instantly share code, notes, and snippets.

@adis-io
Created April 9, 2013 11:28
Show Gist options
  • Select an option

  • Save adis-io/5344970 to your computer and use it in GitHub Desktop.

Select an option

Save adis-io/5344970 to your computer and use it in GitHub Desktop.
(function AddjQuery() {
var el = document.createElement("script"),
loaded = false;
el.onload = el.onreadystatechange = function () {
if ((el.readyState && el.readyState !== "complete" && el.readyState !== "loaded") || loaded) {
return false;
}
el.onload = el.onreadystatechange = null;
loaded = true;
// done!
};
el.async = true;
el.src = 'http://code.jquery.com/jquery-1.8.0.js';
var bhead = document.getElementsByTagName('head')[0];
bhead.insertBefore(el, bhead.firstChild);
}) ();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment