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.

Cut-off options in fixed-width select lists: a simple fix for IE


This fixes a common issue in IE 8 and below whereby wide options are truncated within a fixed-width select box, rather than overflowing as they do in Firefox or Webkit.

It does this by surrounding the element within a span with overflow-x set to hidden, and setting the select width to auto on a mousedown or keyup event then back to its previous value on blur.

Syntax:

$jQueryCollection.fixSelect([minWidth]);

The minWidth parameter is optional, but can be used to hard set a width for the elements. If the result doesn't look quite right, you can use CSS to fix the result: the added span wrapping the select element has the class selectFix to make this possible.

Two custom events are exposed:

initfix
Recomputes the natural width of the element.
applyfix
Resizes the select element (e.g. after assigning focus programmatically).

Downloads



0
Your rating: None