Plugins

The plugins site is currently in development.

We've been looking to provide a higher-quality, spam-free experience at the plugins site for some time, and a major error on our part forced us to shut down the current site before we could put the new one in place. We are developing a new site, and you can follow along with its development on GitHub. For more information about this transition, including steps you can take as a plugin author to prepare, please read our post about what's going on.

ie


Force a browser redraw

Sometimes it happens in some browsers that the engine does not redraw the content elements after some CSS properties have changed. So the design looks pretty weird and you have to force a manual redraw.

To force a redraw on a specific element you have two options:

1. Most common fix which works almost everytime

$('#myelement').forceRedraw(); //same as el.className = el.className

2. If the first solutions does not work we can force a redraw by changing the padding for 1ms and changing it back again afterwards.

$('#myelement').forceRedraw(true);

IE CSS shadows

Plugin emulate CSS3 text-shadow and box-shadow properties for Internet Explorer using proprietary filters.

pngIE

A fast, reliable, and unobtrusive transparent png fix for Internet Explorer 6.

IE HTML5 elements fix

I've created a simple function to insert HTML 5 elements inside the DOM for Internet Explorer based on the HTML5 Shiv created by Remy Sharp.

The function is build so it automatically adds all the (known) HTML 5 elements to the DOM and creates a style element which sets a CSS rule for all elements with { display: block; zoom: 1 } .
It's possible to add custom elements also, so it's possible to create elements like 'wrapper', 'container', 'copyright', etc.

Bad Browser

Display a notice for IE users (you have to design/write it and put in your HTML content). Allow to set a cookie to hide the notice.

Initialize it with BadBrowser.initialize();

jQuery Crash

Summary

A jQuery plugin for crashing IE6. That'll teach those motherf!%@*#s to upgrade their s#*t.

Author

Chad Smith (email)

Requires

Download

jquery-crash.js (435 bytes)

License

Dual licensed under the MIT and GPL licenses.

Usage

To crash IE6 call

Chrome Frame Custom Install

This "jQuery plugin" (couldn't come up with a better term) allows for simple implementation of the Chrome Frame plugin into your website, will auto-identify the browser and version you specify and prompt the user with a plug-in install bar at the top of the page, to get the plug-in. If the user chooses not to install and closes the bar the system will use a cookie to keep the bar from appearing in the future.

Basically we built this to be a simple, and "prettier-than-the-defaults" way of implementing Chrome Frame on sites that we deem "appropriate".

New Line Character Feature Detection Extension

Ever need to know what the new line character is on the client side? Have you, like I have, tried to find the perfect way to add a new line in a PRE tag, so that it did not add a leading or trailing space? Have you tried to figure out what new line character is being used in a textarea for those new lines? Finally you can easily figure it out. Thanks to the new $.support object, it can be tested once an never worried about again. This extension, when included, will automatically extend the $.support object with the appropriate tests results for the client browser. Then later in your application you can test against those results to find the proper new line character for the OS browser combo for the client.

Usage:

$(function() {
var EOL = false;
if ($.support.rnNewLine)
EOL = "\r\n";
else if ($.support.rNewLine)
EOL = "\r";
else if ($.support.nNewLine)
EOL = "\n";
else

ie6Warning

This jquery plugin when bound to a div, will show that div to users with ie6 browsers only. The div is clickable, which will result in a cookie being set advising the user has understood the message, which will not show again for 20 days.

jQuery Watch

This extension method to jQuery adds a timer driven check in order to implement a watch/unwatch methods similar to SpiderMonkey's Object.prototype.watch/unwatch.

function watchCallbackExample(propertyName, oldValue, newValue) {
    alert("o." + propertyName + " changed from " + oldValue + " to " + newValue);
}

//bind a watch event to a callback
jQuery(o).watch("someProperty", watchCallbackExample)

//unbind a watch event from a callback
jQuery(o).unwatch("someProperty", watchCallbackExample);

//unbind all callbacks from a watched property
jQuery(o).unwatch("someProperty");

//unbind all callbacks for all watched properties
jQuery(o).unwatch();

//unbind a given callback from all watched properties
jQuery(o).unwatch(null, watchCallbackExample);