I have a multiple select tag, and I need to write the function onclick of it\'s options, because I need to get the value of last clicked option, but when I wrote the followi
don't bind it on option
$("#multiple_select").click(function(){
alert("works");
});
accepted answer:
$(document).ready(function()
{
var options = $("#supply_cities_select :selected");
var lastOption;
$("#supply_cities_select").click(function()
{
lastOption = $(this).find(':selected').not(options);
options = $(this).find(':selected');
})
});