Ox.$: remove removeOxElement
This commit is contained in:
parent
8f5ff8c6ee
commit
4cf10359ef
1 changed files with 0 additions and 17 deletions
|
@ -64,19 +64,6 @@ Ox.$ = Ox.element = function $(value) {
|
|||
return ret;
|
||||
}
|
||||
|
||||
function removeOxElements(parent, includeParent) {
|
||||
return;
|
||||
if (includeParent) {
|
||||
removeOxElement(parent);
|
||||
} else {
|
||||
Ox.$(parent).find('.OxElement').forEach(removeOxElement);
|
||||
}
|
||||
function removeOxElement(element) {
|
||||
var $element = Ox.getOxElement(element);
|
||||
$element && $element.removeElement();
|
||||
}
|
||||
}
|
||||
|
||||
return elements.length ? Ox.extend(
|
||||
Ox.zipObject(Ox.range(elements.length), elements
|
||||
), {
|
||||
|
@ -339,7 +326,6 @@ Ox.$ = Ox.element = function $(value) {
|
|||
return html;
|
||||
} else {
|
||||
elements.forEach(function(element) {
|
||||
removeOxElements(element);
|
||||
element.innerHTML = string;
|
||||
});
|
||||
return this;
|
||||
|
@ -598,7 +584,6 @@ Ox.$ = Ox.element = function $(value) {
|
|||
remove: function remove() {
|
||||
elements.forEach(function(element) {
|
||||
if (element.parentNode) {
|
||||
removeOxElements(element, true);
|
||||
element.parentNode.removeChild(element);
|
||||
}
|
||||
});
|
||||
|
@ -648,7 +633,6 @@ Ox.$ = Ox.element = function $(value) {
|
|||
var parent = otherElement.parentNode,
|
||||
sibling = otherElement.nextSibling;
|
||||
if (parent) {
|
||||
removeOxElements(otherElement, true);
|
||||
parent.removeChild(otherElement);
|
||||
elements.forEach(function(element) {
|
||||
parent.insertBefore(element, sibling)
|
||||
|
@ -668,7 +652,6 @@ Ox.$ = Ox.element = function $(value) {
|
|||
var parent = element.parentNode,
|
||||
sibling = element.nextSibling;
|
||||
if (parent) {
|
||||
removeOxElements(element, true);
|
||||
parent.removeChild(element);
|
||||
getElements($other).forEach(function(otherElement) {
|
||||
parent.insertBefore(otherElement, sibling);
|
||||
|
|
Loading…
Reference in a new issue