Built by Harvest

Chosen

Chosen is a JavaScript plug-in for Prototype, jQuery & Mootools that makes long, unwieldy select boxes much more user-friendly.

Project page on GitHub

Standard Select

Turns This
Into This

Multiple Select

Turns This
Into This

<optgroup> Support

Single Select with Groups
Multiple Select with Groups

Selected and Disabled Support

Chosen automatically highlights selected options and removes disabled options.

Single Select
Multiple Select with Groups

Default Text Support

Chosen automatically sets the default field text ("Choose a country...") by reading the select element's data-placeholder value. If no data-placeholder value is present, it will default to "Select Some Option" or "Select Some Options" depending on whether the select is single or multiple. You can change these elements in the plug-in js file as you see fit.

<select data-placeholder="Choose a country..." style="width:350px;" multiple class="chzn-select">

Note: on single selects, the first element is assumed to be selected by the browser. To take advantage of the default text support, you will need to include a blank option as the first element of your select list.

Right to Left Support

Chosen supports right to left select boxes too. just add "chzn-rtl" in addition to "chzn-select" to your select tags and you are good to go.

<select class="chzn-select chzn-rtl">

Single right to left select
Multiple right to left select

Change / Update Events

Why use Chosen?

Setup (for MooTools)

Using Chosen is easy as can be.

  1. Download the plugin and copy the chosen files to your app.
  2. Activate the plugin on the select boxes of your choice:
    Single Select: new Chosen($('chzn-select-id'));
    Shortcut for multiple selects at once: $$(".chzn-select").chosen();
  3. Disco.

FAQs