Skip to content

Instantly share code, notes, and snippets.

@rixth
Created July 18, 2011 03:15
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rixth/1088478 to your computer and use it in GitHub Desktop.
Save rixth/1088478 to your computer and use it in GitHub Desktop.
jquery bookmarklet
/**
* This is a template bookmarklet that loads jQuery. Also works
* if another library has defined $ itself.
*/
(function () {
var s = document.createElement('script');
s.setAttribute('src', 'http://jquery.com/src/jquery-latest.js');
s.onload = function () {
jQuery.noConflict();
(function ($) {
// Your code goes here
}(jQuery));
};
document.getElementsByTagName('body')[0].appendChild(s);
}());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment