Multiselect.js update after change

Just try using multiselect.js to input multiple input types

Here is what select looks like

 <select multiple="multiple" id="my-select" name="my-select[]"> <option value='elem_1'>elem 1</option> </select> 

Using multiselect like this -

 var s = $('#my-select'); s.multiSelect({ selectableHeader: "<div class='custom-header'>Options</div>", selectionHeader: "<div class='custom-header'>Selected</div>" }); 

Here's what it looks like --> http://jsfiddle.net/6k8gW/5/

enter image description here

This work is fine until I try to add a new option.

 s.append($('<option />').text("new").val("value")); s.multiSelect('refresh'); 

And the result looks like this: --> http://jsfiddle.net/6k8gW/6/

enter image description here

Why is refresh not working correctly?

+1
jquery html input jquery-plugins multi-select
May 23 '13 at 10:36
source share
1 answer

This is really a mistake. Today I sent a patch that should fix this.

For your interest, if you have any problems with my plugin, you can add the problem at https://github.com/lou/multi-select/issues

thank

+3
May 24 '13 at 19:40
source share



All Articles