问题
I'm trying to fire a click event on my select options.
This is working fine in FF/Safari if the selectlist is a normal multiselect box like this:
http://jsfiddle.net/YZUBs/47/
However, if i include the jQuery Mobile framework, the click event does not trigger anymore:
http://jsfiddle.net/YZUBs/48/
Anyone?
回答1:
The click event on <option> isn't standard and thus not supported in all browsers.
You should use the onchange event instead of onclick.
You can read all the Q&A in this search, this is the subject for all of them...
Updated fiddle
来源:https://stackoverflow.com/questions/10103076/jquery-click-event-on-select-option-not-working-with-jquery-mobile-framework