Skip to content

Instantly share code, notes, and snippets.

@nekman
Last active October 6, 2015 14:08
Show Gist options
  • Save nekman/3005274 to your computer and use it in GitHub Desktop.
Save nekman/3005274 to your computer and use it in GitHub Desktop.
Include latest version of jQuery on a website.
(function(d, url) {
var h = d.getElementsByTagName('head')[0],
s = d.createElement('script');
s.src = url;
s.onload = function() {
console.log('loaded %s', url);
};
h.appendChild(s);
}(document, 'http://code.jquery.com/jquery-git.js'/*prompt('url?')*/));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment