Make sure that special remove and teardown events get called when .die() is used. Additionally made sure that default actions are triggered when namespaced events are used. Fixes #6202 and #6250.

This commit is contained in:
jeresig 2010-03-09 12:22:25 -05:00
parent 2fbe3fbf68
commit f68b46d7ab
3 changed files with 91 additions and 39 deletions

View file

@ -561,7 +561,7 @@ jQuery.extend({
if ( id ) {
data = cache[ id ];
if ( data.events ) {
if ( data && data.events ) {
for ( var type in data.events ) {
if ( special[ type ] ) {
jQuery.event.remove( elem, type );