Created
July 18, 2011 03:15
-
-
Save rixth/1088478 to your computer and use it in GitHub Desktop.
jquery bookmarklet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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