Use the new Sizzle matches functionality.
authorjeresig <jeresig@gmail.com>
Sun, 10 Oct 2010 19:14:23 +0000 (15:14 -0400)
committerjeresig <jeresig@gmail.com>
Sun, 10 Oct 2010 19:14:23 +0000 (15:14 -0400)
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;