Quantcast
Channel: Internet Explorer Web Development forum
Viewing all articles
Browse latest Browse all 3527

How to bind click event to Options of a Select element in IE?

$
0
0


I have been able to bind click event to options of a select element using the following code which works in Chrome and Firefox but NOT in IE (internet Explorer) Is there any other approach to do this so that it will work in IE?

$(#select).on("click", "option",(function(){

// Do something like get the value of the option which is just clicked on

});

I want to find out the value of the last clicked on option of a  multi select element, which is not possible using $(#select).val() as it always provides all the selected values in the multi select in the existing order.


Thanks, Avishek Dutta


Viewing all articles
Browse latest Browse all 3527

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>