How To Get Clicked Option Value Of A Multiple Select, Fired By .change() Event
I have a select multiple list:
Solution 1:
What does not work for you, I've checked the answers in link which you posted and it works.
See working example on fiddle: http://jsfiddle.net/unkxt8h3/
The only thing here is, that the event is fired even when you deselect the option. But checking if it's selected or not should be easy peacy ;)
html:
<select id="List" multiple="multiple">
<option value="1">Option 1</option>
<option value="2">Option 2</option>
<option value="3">Option 3</option>
</select>
JS:
$("#List option").click(function () {
var value = $(this).attr("value");
console.log(value);
alert(value);
});
Post a Comment for "How To Get Clicked Option Value Of A Multiple Select, Fired By .change() Event"