select-multiple
select-multiple copied to clipboard
'addOption' don't work
Thank you for your efforts on this library~That's so cool.
However,I met a problem when I used the 'addOption'.
Case1
list.forEach(function (element, index) { $("#my-select").append("<option value='"+index+"'>"+element+"</option>"); }); $('#my-select').selectMultiple();
Case2
$('#my-select').selectMultiple('addOption',{value:"elem_"+index,text:element});
Case1 worked but item couldn't be clicked in Case2(no pointer, no √)