Replace select element with a two listbox widget using jQuery/Twitter Bootstrap. Has the ability to filter options and to sort the selected elements.
- "bootstrap": "~3.3.7"
- "jquery": "~3.2.1"
bower install double-list-box --save
Include the files in your project like below
<link rel="stylesheet" type="text/css" href="src/css/doublelistbox.css">
<script type="text/javascript" src="src/js/doublelistbox.js"></script>
$(function(){
var listBox = DoubleListBox($('SELECT ELEMENT SELECTOR'));
});
DoubleListBox Object
Update options, keeps already selected options selected
Param | Description |
---|---|
[ ] | updates - Array of options |
Destroys the DoubleListBox and replaces it with the original select element
DoubleListBox is freely distributable under the terms of the MIT license. Copyright notice and permission notice shall be included in all copies or substantial portions of the Software.
Linus Kohl / @linuskohl