2011-10-16

Load jQuery via bookmarklet

Bookmarklet is JavaScript code stored in a bookmark to be launched by simple click.
It can be used to e.g. load any external script on any webpage! Just make a bookmark a fill its contents with: javascript:CODE;

To create bookmarklet that loads latest jQuery which you can use on any page from browser console (Chrome Developer Tools, Firefox's Firebug), just put the following code into the bookmark's URL:

javascript:el=document.createElement('script');el.src='http://code.jquery.com/jquery-latest.min.js';document.body.appendChild(el);

Or just drag this link to your bookmarks: Load jQuery

No comments:

Post a Comment