Skip to content

Instantly share code, notes, and snippets.

@rixth
Created July 18, 2011 03:15
Show Gist options
  • 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