jQuery problem with change event and IE8
- by Marcus
There is a bug in jQuery 1.4.2 that makes change event on select-element getting fired twice when using both DOM-event and a jQuery event, and this only on IE7/8.
Here is the test code:
<html>
<head>
    <script src="http://code.jquery.com/jquery-1.4.2.js" type="text/javascript"></script>
    <script type="text/javascript">
       jQuery(document).ready(function() {
         jQuery(".myDropDown").change(function() {
         });
       });
    </script>
</head>
<body>
    <select class="myDropDown" onchange="alert('hello');">
          <option>1</option>
          <option>2</option>
          <option>3</option>
          <option>4</option>
        </select>
</body>
</html>
Ticket to actual bug: http://dev.jquery.com/ticket/6593
This causes alot of trouble for us in our application cause we use both ASP.NET-events mixed with jQuery and once you hook up a change event on any element every select (dropdown) gets this double firing problem.
Is there anyone who knows a way around this in the meantime until this issue is fixed?