javascript - How to detect if an item is selected and alert its value with this jquery-editable-select plugin -


i got jquery-editable-select plugin here

it doesn't work normal select>option> tags. tried adding many different eventlisteners , still have no success. basically, want alert selected value when 1 of options being selected , alert text value when users decide type text field.

<select id="editable-select"> <option>alfa romeo</option> <option>audi</option> <option>bmw</option> <option>citroen</option> </select>  $('#editable-select').editableselect(); 

please include plugin js & css files under src folder before test this.

it should this. enter image description here

the plugin turns original html this. enter image description here lot!

the plugin has listener

listen changes

  $('#select')         .editableselect()         .on('select.editable-select', function (e, li) {             $('#last-selected').html(                 li.val() + '. ' + li.text()             );         }); 

jquery editable select demo


Comments

Popular posts from this blog

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -