yanickrochon / jquery.uix.multiselect

Completely rewritten, multiselect widget with a more concise API
http://mind2soft.com/labs/jquery/multiselect/
MIT License
139 stars 62 forks source link

jQuery UIx Multiselect

Version 2.0

Preview

Introduction

This widget is a complete rewrite of the previous version. Why a new rewrite? Because the original widget's attempt was to create a all-in-one-out-of-the-box-multi-featured SELECT replacement and thus failed to be compliant with the DOMElement's behavior and limitations. Notably, it failed to :

Also, it quickly became slow when loading a few hundred items and some branches had drag and drop issues.

Release notes

This widget is stable enough to be used in staging environments. However it is still under development, in testing phase, as some features may require more feedbacks yet! (Mainly browser compatiblity.) At this point, expect minor bug fixes within 72 hours, and there will be no more features planned at this point.

The compressed (minified) version is created using the YUI Compressor.

Requirements

Features

Usage

Note : Even though it is a complete rewrite of the widget, I kept the multiselect widget name (but it is declared as uix.multiselect instead of ui.multiselect).

$('selector').multiselect();

To programmatically select/deselect, add/modify/remove items, you may access and modify the DOMElement directly, then call the refresh widget method to update it.

$('selector').append("<option value='item1'>My Item 1</option>")
             .multiselect('refresh');

// manually filter available options
//   This will only render visible the available items containing 'My Item' (case insensitive)
$('selector').multiselect('search', 'my item');

$('selector').multiselect('destroy');  // restore original element

See wiki documentation for more information.

TODO

Limitations