Commit 6f0b06aa authored by jeresig's avatar jeresig

Fix formatting and switch to using the new matchesSelector method in Sizzle.

parent 96d8c481
...@@ -102,13 +102,14 @@ jQuery.fn.extend({ ...@@ -102,13 +102,14 @@ jQuery.fn.extend({
var ret = []; var ret = [];
for ( var i=0,j=this.length; i<j; i++ ) { for ( var i = 0, j = this.length; i < j; i++ ) {
var cur = this[i]; var cur = this[i];
while ( cur ) { 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 ); ret.push( cur );
break; break;
} else { } else {
cur = cur.parentNode; cur = cur.parentNode;
if ( !cur.ownerDocument || cur === context ) { if ( !cur.ownerDocument || cur === context ) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment