I'm having a problem in Chrome
with the following:
var items = $("option", obj);
items.each(function(){
$(this).click(function(){
// alert("test");
process($(this).html());
return false;
});
});
The click
event doesn't seem to fire in Chrome
, but works in Firefox
.
I wanna be able to click
on a option
element from a combo, if I do instead another kind of element, lets say <li>
it works fine. Any ideas? Thanks.
Looking for this on 2018. Click event on option tag, inside a select tag, is not fired on Chrome.
Use change event, and capture the selected option:
Be aware that $target may be a collection of objects if the select tag is multiple.