X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fevent.js;h=0bf7d90ba8a912693dfb11c7f0d728a4cd974ee0;hb=ea5d51400820585a6d31011e1a1109c5a1213360;hp=79a6b9529d4b88173afd03196c31b9ef72d39e0a;hpb=a00e63ea5a2c26f8e6384b5d1e2247be44c727e9;p=jquery.git diff --git a/src/event.js b/src/event.js index 79a6b95..0bf7d90 100644 --- a/src/event.js +++ b/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 ); + }); }; });