aboutsummaryrefslogtreecommitdiffstats
path: root/src/traversing.js
diff options
context:
space:
mode:
authorDave Methvin <dave.methvin@gmail.com>2012-10-23 20:22:34 -0400
committerDave Methvin <dave.methvin@gmail.com>2012-10-24 22:36:20 -0400
commit69e2f068fe7d16c1ccd6cb99c6376f0d8891ea33 (patch)
tree47d0bdb62782c6650f9d99fd6cd3c6335aa9f47d /src/traversing.js
parent305e169ad663849cd8b4935e8f70c55dc8e2be01 (diff)
downloadjquery-69e2f068fe7d16c1ccd6cb99c6376f0d8891ea33.tar.gz
jquery-69e2f068fe7d16c1ccd6cb99c6376f0d8891ea33.zip
Fix #9469. Remove semi-functional .selector property. Close gh-1006.
Saved 65 bytes.
Diffstat (limited to 'src/traversing.js')
-rw-r--r--src/traversing.js12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/traversing.js b/src/traversing.js
index 3e04bf4fb..1f38d68cd 100644
--- a/src/traversing.js
+++ b/src/traversing.js
@@ -25,7 +25,7 @@ jQuery.fn.extend({
});
}
- ret = this.pushStack( "", "find", selector );
+ ret = this.pushStack( [] );
for ( i = 0, l = this.length; i < l; i++ ) {
length = ret.length;
@@ -44,6 +44,8 @@ jQuery.fn.extend({
}
}
+ // Needed because $( "selector", context ) becomes $( context ).find( "selector" )
+ ret.selector = ( this.selector ? this.selector + " " : "" ) + selector;
return ret;
},
@@ -62,11 +64,11 @@ jQuery.fn.extend({
},
not: function( selector ) {
- return this.pushStack( winnow(this, selector, false), "not", selector);
+ return this.pushStack( winnow(this, selector, false) );
},
filter: function( selector ) {
- return this.pushStack( winnow(this, selector, true), "filter", selector );
+ return this.pushStack( winnow(this, selector, true) );
},
is: function( selector ) {
@@ -103,7 +105,7 @@ jQuery.fn.extend({
ret = ret.length > 1 ? jQuery.unique( ret ) : ret;
- return this.pushStack( ret, "closest", selectors );
+ return this.pushStack( ret );
},
// Determine the position of an element within
@@ -216,7 +218,7 @@ jQuery.each({
ret = ret.reverse();
}
- return this.pushStack( ret, name, core_slice.call( arguments ).join(",") );
+ return this.pushStack( ret );
};
});