Simplified the structure of the .css() and .attr() methods (reducing the number of...
[jquery.git] / src / selector.js
index e58b257..c189515 100644 (file)
@@ -659,7 +659,7 @@ var Expr = Sizzle.selectors = {
 var origPOS = Expr.match.POS;
 
 for ( var type in Expr.match ) {
-       Expr.match[ type ] = RegExp( Expr.match[ type ].source + /(?![^\[]*\])(?![^\(]*\))/.source );
+       Expr.match[ type ] = new RegExp( Expr.match[ type ].source + /(?![^\[]*\])(?![^\(]*\))/.source );
 }
 
 var makeArray = function(array, results) {
@@ -829,10 +829,9 @@ if ( document.querySelectorAll ) (function(){
                return oldSizzle(query, context, extra, seed);
        };
 
-       Sizzle.find = oldSizzle.find;
-       Sizzle.filter = oldSizzle.filter;
-       Sizzle.selectors = oldSizzle.selectors;
-       Sizzle.matches = oldSizzle.matches;
+       for ( var prop in oldSizzle ) {
+               Sizzle[ prop ] = oldSizzle[ prop ];
+       }
 })();
 
 if ( document.getElementsByClassName && document.documentElement.getElementsByClassName ) (function(){