This is the whole error:
load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-widget,jquery…:3
Uncaught HierarchyRequestError: Failed to execute 'insertBefore' on 'Node': The new child element contains the parent.
It disappears when the plugin is deactivated.
The detailed code (excerpt) is as follows (I have enclosed the problematic line in <strong>
tags):
n.fn.extend({
domManip: Ha,
detach: function(a) {
return Ia(this, a, !0)
},
remove: function(a) {
return Ia(this, a)
},
text: function(a) {
return Y(this, function(a) {
return void 0 === a ? n.text(this) : this.empty().append((this[0] && this[0].ownerDocument || d).createTextNode(a))
}, null , a, arguments.length)
},
append: function() {
return Ha(this, arguments, function(a) {
if (1 === this.nodeType || 11 === this.nodeType || 9 === this.nodeType) {
var b = Ca(this, a);
b.appendChild(a)
}
})
},
prepend: function() {
return Ha(this, arguments, function(a) {
if (1 === this.nodeType || 11 === this.nodeType || 9 === this.nodeType) {
var b = Ca(this, a);
b.insertBefore(a, b.firstChild)
}
})
},
before: function() {
return Ha(this, arguments, function(a) {
this.parentNode && this.parentNode.insertBefore(a, this)
})
},
after: function() {
return Ha(this, arguments, function(a) {
<strong> this.parentNode && this.parentNode.insertBefore(a, this.nextSibling)</strong>
})
},
empty: function() {
for (var a, b = 0; null != (a = this[b]); b++) {
1 === a.nodeType && n.cleanData(ea(a, !1));
while (a.firstChild)
a.removeChild(a.firstChild);
a.options && n.nodeName(a, "select") && (a.options.length = 0)
}
return this
},
clone: function(a, b) {
return a = null == a ? !1 : a,
b = null == b ? a : b,
this.map(function() {
return n.clone(this, a, b)
})
},
html: function(a) {
return Y(this, function(a) {
var b = this[0] || {}
, c = 0
, d = this.length;
if (void 0 === a)
return 1 === b.nodeType ? b.innerHTML.replace(ta, "") : void 0;
if ("string" == typeof a && !wa.test(a) && (l.htmlSerialize || !ua.test(a)) && (l.leadingWhitespace || !aa.test(a)) && !da[($.exec(a) || ["", ""])[1].toLowerCase()]) {
a = n.htmlPrefilter(a);
try {
for (; d > c; c++)
b = this[c] || {},
1 === b.nodeType && (n.cleanData(ea(b, !1)),
b.innerHTML = a);
b = 0
} catch (e) {}
}
b && this.empty().append(a)
}, null , a, arguments.length)
},
replaceWith: function() {
var a = [];
return Ha(this, arguments, function(b) {
var c = this.parentNode;
n.inArray(this, a) < 0 && (n.cleanData(ea(this)),
c && c.replaceChild(b, this))
}, a)
}
}),