diff --git a/source/Ox/js/DOM.js b/source/Ox/js/DOM.js index d1e65772..bdb809d3 100644 --- a/source/Ox/js/DOM.js +++ b/source/Ox/js/DOM.js @@ -53,14 +53,14 @@ Ox.$ = Ox.element = function(value) { } function removeOxElements(parent, includeParent) { - return; if (includeParent) { removeOxElement(parent); } else { - $(parent).find('.OxElement').forEach(removeOxElement); + Ox.$(parent).find('.OxElement').forEach(removeOxElement); } function removeOxElement(element) { - Ox.getOxElement(element).removeElement(); + var $element = Ox.getOxElement(element); + $element && $element.removeElement(); } } @@ -154,7 +154,7 @@ Ox.$ = Ox.element = function(value) { @*/ children: function children() { return Ox.unique(Ox.flatten(elements.map(function(element) { - return Ox.slice(element.childNodes); + return element.childNodes; }))); }, /*@ @@ -237,7 +237,7 @@ Ox.$ = Ox.element = function(value) { @*/ find: function find(string) { return Ox.unique(elements.map(function(element) { - return this[0].querySelectorAll(string || '*'); + return element.querySelectorAll(string || '*'); })); }, /*@