Skip to content
Permalink
Browse files
Fix generic event handler and $events expando removal for IE
  • Loading branch information
brandonaaron committed Mar 5, 2007
1 parent 9791855 commit fe1910d4d9f547774cb26f4770b303635333f8e6
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/event/event.js
@@ -75,21 +75,21 @@ jQuery.event = {

// remove all handlers for the given type
else
for ( handler in events[type] )
for ( handler in element.$events[type] )
delete events[type][handler];

// remove generic event handler if no more handlers exist
for ( ret in events[type] ) break;
if ( !ret ) {
ret = element["on" + type] = undefined;
delete events[type];
ret = element["on" + type] = null;
delete element.$events[type];
}
}

// Remove the expando if it's no longer used
for ( ret in events ) break;
if ( !ret )
delete element.$events;
element.$events = null;
}
},

0 comments on commit fe1910d

Please sign in to comment.