Index: src/selector/selector.js =================================================================== --- src/selector/selector.js (revision 1016) +++ src/selector/selector.js (working copy) @@ -297,6 +297,10 @@ }, filter: function(t,r,not) { + // Support for array selectors + if ( typeof t == 'object' ) + t = t.join(','); + // Look for common filter expressions while ( t && /^[a-z[({<*:.#]/i.test(t) ) { @@ -312,13 +316,13 @@ var m = re.exec( t ); if ( m ) { + // Remove what we just matched + t = t.substring( m[0].length ); + // Re-organize the first match if ( jQuery.expr[ m[1] ]._resort ) m = jQuery.expr[ m[1] ]._resort( m ); - // Remove what we just matched - t = t.replace( re, "" ); - break; } } Index: src/selector/selectorTest.js =================================================================== --- src/selector/selectorTest.js (revision 1016) +++ src/selector/selectorTest.js (working copy) @@ -41,6 +41,12 @@ t( "Comma Support", "a.blog,div", ["mark","simon","main","foo"] ); }); +test("expressions - array", function() { + expect(1); + t( "Array Support", ["a.blog", "div"], ["mark","simon","main","foo"] ); +}); + + test("expressions - child and adjacent", function() { expect(14); t( "Child", "p > a", ["simon1","google","groups","mark","yahoo","simon"] );