Selectx

jQuery plugin to maintain the history of choices made with an HTML select

Selectx demo.

The following examples illustrate the basic functionalities of this plugin.
All the needed customisation code is put inside this HTML page.
The default option widget template is defined inside the plugin itself.

1) All defaults

The purpose of SelectX is to keep a record of all your choices

2) Dress an existing select

Provide an existing select with selectx capabilities

3) {nullOptionMessage:'have a go, my friend'}

Personalized null label

4) {selectOnce:true}

Chosen options become unavailable, but reappear when you delete their widget

5) {selectOne:true}

You may choose only one time

6) {onSelectCallback:aFunction}

Do whatever you want at the end of the widget creation

7) {onUnselectCallback:aFunction}

Do whatever you want before the widget is destroyed

8) {selectionsContainer:$jquerySelector}

Attach option widgets wherever you want


9) {optionsList:anArray}

You may provide your own list of options. Minimal required fields are 'text' and 'value'

9) {templateHtml:aString}

Provide your own static HTML snippet for the option widget. There are some mandatory class names to use.

Other features, not illustrated in this page:
- Serialisation of the plugin status with ordered recording of the chosen items
- Restore of the plugin after serialisation.