jQuery detach() Method
jQuery detach() Method
The detach() method is used to remove the selected elements with all of their text and child nodes. However, it keeps data and events. It also keeps a copy of the removed elements which allows them to be reinserted at a later time.
Syntax:-
Its syntax is:- $(selector).detach()