Sizzle is a new take on using CSS selectors within Javascript and aims to be far more efficient than the methods commonly used by most current Javascript libraries.
//Overwrite findChildElements to use Sizzle http://sizzlejs.comhttp://briancrescimanno.com/2009/03/24/using-sizzle-with-prototype
Selector.findChildElements = function(element, expression){
expression = expression.join(", ");
var results = Sizzle(expression, element);
if(results.length > 0){
for(var i=0; i < results.length; i++){
results[i] = Element.extend(results[i]);
}
}
return results;
};
No comments:
Post a Comment