Merge branch 'bug-5735'
authorjeresig <jeresig@gmail.com>
Thu, 31 Dec 2009 19:49:01 +0000 (14:49 -0500)
committerjeresig <jeresig@gmail.com>
Thu, 31 Dec 2009 19:49:01 +0000 (14:49 -0500)
Makefile
src/event.js

index a0dbd8b..fdb57bd 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -41,10 +41,10 @@ ${DIST_DIR}:
 
 init:
        @@echo "Grabbing external dependencies..."
-       @@if test ! -d test/qunit; then git clone git://github.com/jquery/qunit.git test/qunit; fi
-       @@if test ! -d src/sizzle; then git clone git://github.com/jeresig/sizzle.git src/sizzle; fi
-       @@cd src/sizzle && git pull origin master &> /dev/null
-       @@cd test/qunit && git pull origin master &> /dev/null
+       @@if test ! -d test/qunit/.git; then git clone git://github.com/jquery/qunit.git test/qunit; fi
+       @@if test ! -d src/sizzle/.git; then git clone git://github.com/jeresig/sizzle.git src/sizzle; fi
+       @@cd src/sizzle && git pull origin master > /dev/null 2>&1
+       @@cd test/qunit && git pull origin master > /dev/null 2>&1
 
 jquery: ${DIST_DIR} selector ${JQ}
 
index 0345b0c..64b202d 100644 (file)
@@ -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 );
+                       });
        };
 });