Fix formatting and switch to using the new matchesSelector method in Sizzle.
This commit is contained in:
parent
96d8c481b8
commit
6f0b06aa9b
|
@ -106,9 +106,10 @@ jQuery.fn.extend({
|
|||
var cur = this[i];
|
||||
|
||||
while ( cur ) {
|
||||
if ( pos ? pos.index(cur) > -1 : jQuery.find.matches(selectors, [cur]).length ) {
|
||||
if ( pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors) ) {
|
||||
ret.push( cur );
|
||||
break;
|
||||
|
||||
} else {
|
||||
cur = cur.parentNode;
|
||||
if ( !cur.ownerDocument || cur === context ) {
|
||||
|
|
Loading…
Reference in a new issue