Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Prototype._original_property = window.Sizzle;
- //= require "sizzle"
- (function(engine) {
- function extend(elements) {
- for (var i = 0, length = elements.length; i < length; i++) {
- Element.extend(elements[i]);
- }
- return elements;
- }
- function select(selector, scope) {
- return extend(engine(selector, scope || document));
- }
- function match(element, selector) {
- return engine.matches(selector, [element]).length == 1;
- }
- Prototype.Selector.engine = engine;
- Prototype.Selector.select = select;
- Prototype.Selector.match = match;
- })(Sizzle);
- // Restore globals.
- window.Sizzle = Prototype._original_property;
- delete Prototype._original_property;
Add Comment
Please, Sign In to add comment