Skip to content
Permalink
Browse files

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 ea5d51400820585a6d31011e1a1109c5a1213360
Showing with 5 additions and 3 deletions.
  1. +5 −3 src/event.js
@@ -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 );
});
};
});

0 comments on commit ea5d514

Please sign in to comment.
You can’t perform that action at this time.