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.
the plugin has listener
listen changes
$('#select') .editableselect() .on('select.editable-select', function (e, li) { $('#last-selected').html( li.val() + '. ' + li.text() ); });
Comments
Post a Comment