jquery - select box behaviour in IE -
<title>sample</title> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <script type="text/javascript" src="jquery-1.4.2.min.js"> </script> </head> <body> <select onchange="alert('hi')"> <option value="0" selected="selected">option1</option> <option value="1">option1</option> <option value="2">option1</option> </select> <script> $('select').bind('change',function(){ var ="true"; }) </script>
in firefox alert getting called once
in ie7/8 alert coming twice. wondering why in ie alert coming twice
thanks, amit
it's not you, it's jquery bug ie, filed in bug tracker here, here , here....unfortunately looks it'll jquery 1.5 before make change fixing this.
currently (only in ie) dom 0 event handler triggered (your inline onchange
) jquery handler...then execution causes dom 0 handler fire again.
Comments
Post a Comment