ListPicker.js is a JavaScript plugin that creates lists from which you can select items, toggle between items, and return your choices.
two side multiselect plugin, dual listbox get selected value, dual list box example, pure js dual list box component
How to make use of it:
1. Insert the javascript and the style sheet into the menu picker on the HTML page.
<link rel="stylesheet" href="src/list-picker.css"> <script src="src/list-picker.js"></script>
2. The basic HTML structure of the list picker.
<div class="list-picker"> <ul id="options" class="list-picker-list"> <li class="list-picker-list-item">Item</li> </ul> <ul id="picks" class="list-picker-list"></ul> </div>
3. Set up your list items in a JavaScript array like this:
var list = ['ActionScript', 'CSS', 'C#', 'HTML', 'Java', 'JavaScript', 'Python', 'Ruby', 'Swift'];
4. Configure the menu picker with default settings.
var listPicker = new ListPicker({ list: list });
5. All configuration options.
var listPicker = new ListPicker({ list: list, // Array list gap: 1, // Gap between items order: 'asc', // Ordering in second list reset: true // Reseting when picked });
6. Get the selected items.
listPickerInstance.getPicks()
Settings
Property | Description | Type | Default |
---|---|---|---|
drag | Define if items are draggable | boolean | false |
fixed | Define if items’ top position is fixed | boolean | false |
gap | Space between items | number | 0 |
list | List of values | array | null |
order | Define if items are reorderable | boolean | false |
Callbacks
Property | Description |
---|---|
template | Return a custom template inside the list item |
Dynamic Dual List Picker, ListPicker.js Plugin/Github
See Demo And Download
Official Website(fabiomrosa): Click Here
This superior jQuery/javascript plugin is developed by fabiomrosa. For extra advanced usage, please go to the official website.