Handle child selectors in particular - away from the selector engine. Fixes #7029.
This commit is contained in:
parent
873c28425f
commit
f1f6bc3ec4
2 changed files with 9 additions and 1 deletions
|
@ -4,11 +4,17 @@ var runtil = /Until$/,
|
|||
rparentsprev = /^(?:parents|prevUntil|prevAll)/,
|
||||
// Note: This RegExp should be improved, or likely pulled from Sizzle
|
||||
rmultiselector = /,/,
|
||||
rchild = /^\s*>/,
|
||||
isSimple = /^.[^:#\[\.,]*$/,
|
||||
slice = Array.prototype.slice;
|
||||
|
||||
jQuery.fn.extend({
|
||||
find: function( selector ) {
|
||||
// Handle "> div" child selectors and pass them to .children()
|
||||
if ( typeof selector === "string" && rchild.test( selector ) ) {
|
||||
return this.children( selector.replace( rchild, "" ) );
|
||||
}
|
||||
|
||||
var ret = this.pushStack( "", "find", selector ), length = 0;
|
||||
|
||||
for ( var i = 0, l = this.length; i < l; i++ ) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue