remove child element from parent element in javascript code example
Example: how to remove an element from a parent element javascript
function removeElement(el) {
el.parentNode.removeChild(el);
}
// or
HTMLElement.prototype.remove = function() { this.parentNode.removeChild(this); return this; }