Why don't click event for select option works in IE(8)
In my form a <select> with options
I wrote
- $('#select option'). click(function () {
- myFunction();
- });
Works fine in FF -
IE8 works only for
- $('#select'). click(function () {
- myFunction();
- });
but it is not at all the same thing, and myFunction is fired when as soon the select opens.
and I
want it is fired only when I click on an option (even if it is not a change !)
I tried some other manners for the same result.
The last one was to wriet the options as
- <options class="opt" value ='x'><option>
- and $('.opt').click(function () {
- myFunction();
- });
Works fine in FF, but not in IE8
I cannot find other ideas on the net ! Have some ?
Many thanks !
Charles