jQuery remove () method
Definition and Usage
remove () method to remove the selected elements, including all text and child nodes.
This method also removes the selected element data and events.
Tip: To remove the element, but keep the data and events, use the detach () method instead.
Tip: If you need to remove content from the selected element, use empty () method.
grammar
$(selector).remove()
More examples
Different detach () and remove () between
Between different methods of presentation detach () and remove ().