Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
When .bind('unload') was called it accidentally went recursive, from 1…
…bac616. Fixes #5688.
  • Loading branch information
jeresig committed Dec 31, 2009
1 parent a00e63e commit ea5d514
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/event.js
Expand Up @@ -778,9 +778,11 @@ jQuery.each(["bind", "one"], function( i, name ) {
jQuery( this ).unbind( event, handler );
return fn.apply( this, arguments );
}) : fn;
return type === "unload" ? this.one(type, data, handler, thisObject) : this.each(function() {
jQuery.event.add( this, type, handler, data );
});
return type === "unload" && name !== "one" ?
this.one( type, data, fn, thisObject ) :
this.each(function() {
jQuery.event.add( this, type, handler, data );
});
};
});

Expand Down

0 comments on commit ea5d514

Please sign in to comment.