diff --git a/src/dom/selector.js b/src/dom/selector.js index e011521..b8b0331 100644 --- a/src/dom/selector.js +++ b/src/dom/selector.js @@ -89,3 +89,13 @@ } }); })(); + +/** related to: Selector + * $$(expression...) -> [Element...] + * + * Returns all elements in the document that match the provided CSS selectors. +**/ +window.$$ = function() { + var expression = $A(arguments).join(', '); + return Prototype.Selector.select(expression, document); +}; \ No newline at end of file diff --git a/src/dom/sizzle_adapter.js b/src/dom/sizzle_adapter.js index 71ad3ee..26249eb 100644 --- a/src/dom/sizzle_adapter.js +++ b/src/dom/sizzle_adapter.js @@ -1,4 +1,10 @@ +Prototype._original_sizzle = window.Sizzle; //= require +Prototype.Sizzle = window.Sizzle; + +// Restore globals. +window.Sizzle = Prototype._original_sizzle; +delete Prototype._original_sizzle; Prototype.Selector = (function(Sizzle) { function extend(elements) { @@ -24,14 +30,5 @@ Prototype.Selector = (function(Sizzle) { match: match, filter: filter }; -})(Sizzle); +})(Prototype.Sizzle); -/** related to: Selector - * $$(expression...) -> [Element...] - * - * Returns all elements in the document that match the provided CSS selectors. -**/ -window.$$ = function() { - var expression = $A(arguments).join(', '); - return Prototype.Selector.select(expression, document); -}; \ No newline at end of file