X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;f=src%2Fevent.js;h=64b202d1aeb57295c89d305e08afd7a25f92fd9d;hb=40ce7f98301e4ff0d912f91025af0fd7b82107bd;hp=0345b0c1e9c67bb4da4fb9247245396dee5ef38e;hpb=6cb2945837ccca55204191a8e7a70b2b2486c28e;p=jquery.git diff --git a/src/event.js b/src/event.js index 0345b0c..64b202d 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 ); + }); }; });