Run jQuery Code Bookmarklet v0.4


This would probably actually be better called “Run some arbitrary code that requires jQuery, loading a minimum required version of jQuery first (but only if necessary), affecting the host page as little as possible Bookmarklet” but that wasn’t nearly as catchy as “Run jQuery Code Bookmarklet” so I’m going to stick with that.

This boilerplate code is useful for bookmarklets that need jQuery to execute their payload, in situations where you don’t know if jQuery or a specific minimum required version of jQuery will already exist in the page.

Also, an easy-to-use bookmarklet generator has been created to streamline the process!

As always, please check out the Run jQuery Code Bookmarklet now, and let me know if you have any questions, comments, or suggestions!

Post A Comment

  • Any of these HTML tags may be used for style: a, b, i, br, p, strong, em, pre, code.
  • Multi-line JavaScript code should be wrapped in <pre class="brush:js"></pre>
    (supported syntax highlighting brushes: js, css, php, plain, bash, ruby, html, xml)
  • Use &lt; instead of < and &gt; instead of > in the examples themselves.