listbox.js
listbox.js copied to clipboard
How to add item dynamic ?
Can I use the listbox and add item dynamic ?
HTML
<select id="selList" style="font-size:small;">
<option>BANANA</option>
</select>
var myarray= [ "Apple" , "Orange" ] ;
$.each(myarray,function (idx,value) {
//How to add item from array to select object?
});
Unfortunately, there's no way to it now :(. Some time ago I thought about covering this case by introducing mutation observer ( #4 ), but I stop being interested in this project.. so it didn't happen.
Any contribution is welcome!
@don750421 Maybe this is, what you are searching for: https://github.com/code-chris/extended-listbox