Skip to content

Instantly share code, notes, and snippets.

@0livier
Created October 3, 2011 14:22
Show Gist options
  • Save 0livier/1259197 to your computer and use it in GitHub Desktop.
Save 0livier/1259197 to your computer and use it in GitHub Desktop.
Load jQuery
var jq = document.createElement('script');
jq.src = 'http://jquery.com/src/jquery-latest.js';
jq.type = 'text/javascript';
document.getElementsByTagName('head')[0].appendChild(jq);
(function() {
if (document.defaultView.jQuery) jQueryLoaded(document.defaultView.jQuery);
else setTimeout(arguments.callee, 100);
})();
function jQueryLoaded($) {
console.dir($);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment