remove() in jQuery
This method removes the set of matched elements from the DOM.
When removing using this method, it will remove every contents such as text, attributes even the child nodes.
It also removes events specified for the element.
- selector - It denotes a selector expression that filters the set of matched elements to be removed.