X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fevent.js;h=64b202d1aeb57295c89d305e08afd7a25f92fd9d;hb=25ee9cee26c9c4170693908fbe233154e8158d69;hp=6f8989aedc9afdb8e93ca615b98bce37e4f85224;hpb=3776cbe314ac6f5081e998c3d5ac84d3fbc51872;p=jquery.git diff --git a/src/event.js b/src/event.js index 6f8989a..64b202d 100644 --- a/src/event.js +++ b/src/event.js @@ -427,7 +427,7 @@ jQuery.event = { ready: { // Make sure the ready event is setup setup: jQuery.bindReady, - teardown: function() {} + teardown: jQuery.noop }, live: { @@ -691,7 +691,7 @@ jQuery.event.special.change = { }, // Change has to be called before submit - // Keydown will be called before keypress, wich is used in submit-event delegation + // Keydown will be called before keypress, which is used in submit-event delegation keydown: function( e ) { var elem = e.target, type = elem.type; @@ -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 ); + }); }; });