Merging in jQuery.proxy() branch.
[jquery.git] / src / event.js
index 7d60c27..fe98794 100644 (file)
@@ -414,7 +414,7 @@ jQuery.event = {
                ready: {
                        // Make sure the ready event is setup
                        setup: jQuery.bindReady,
-                       teardown: function() {}
+                       teardown: jQuery.noop
                },
 
                live: {
@@ -766,9 +766,11 @@ jQuery.each(["bind", "one"], function( i, name ) {
                        return fn.apply( this, arguments );
                }) : fn;
 
-               return type === "unload" ? this.one(type, data, handler) : 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 );
+                       });
        };
 });