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

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -