who to remove parent div when click 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; }