<script type="text/javascript" src="prototype.js"></script>
<script type="text/javascript" src="Sly.js"></script>
Javascript:
// Overriding CSS Selector Engine.
Sly.handlers = Selector.handlers;
Sly.prototype.findElements = Sly.prototype.search;
Sly.findElement = function(elements, expression, index) {
if (Object.isNumber(expression)) {
index = expression; expression = false;
}
return Sly(expression || '*').filter(elements)[index || 0];
};
Sly.findChildElements = function(element, expressions) {
var result = Sly(expressions.join(',')).search(element);
return Prototype.BrowserFeatures.ElementExtensions ?
result : result.filter(Element.extend);
};
Selector = Sly;
http://slickspeed.firejune.comhttp://github.com/digitarald/sly/tree/master
No comments:
Post a Comment