X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;ds=sidebyside;f=src%2Fevent.js;h=64b202d1aeb57295c89d305e08afd7a25f92fd9d;hb=b2289f3ec174c5b22d130d8c36a5e07daa6d02df;hp=79a6b9529d4b88173afd03196c31b9ef72d39e0a;hpb=7e69fdbad4d4bf05e94d22fd4a3e0a9fe625fc69;p=jquery.git diff --git a/src/event.js b/src/event.js index 79a6b95..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: { @@ -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 ); + }); }; });