Use the new Sizzle matches functionality.
[jquery.git] / src / traversing.js
index cfb344b..df43178 100644 (file)
@@ -106,7 +106,7 @@ jQuery.fn.extend({
                        var cur = this[i];
 
                        while ( cur ) {
-                               if ( pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors) ) {
+                               if ( pos ? pos.index(cur) > -1 : jQuery.find.matches(selectors, cur) ) {
                                        ret.push( cur );
                                        break;