listbox.js icon indicating copy to clipboard operation
listbox.js copied to clipboard

How to add item dynamic ?

Open don750421 opened this issue 9 years ago • 2 comments

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?
 });

don750421 avatar Sep 17 '15 00:09 don750421

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!

ikalnytskyi avatar Sep 20 '15 10:09 ikalnytskyi

@don750421 Maybe this is, what you are searching for: https://github.com/code-chris/extended-listbox

ckotzbauer avatar Jan 09 '16 18:01 ckotzbauer