0 votes
in JQuery by
Explain the difference between the .detach() and remove() methods in jQuery.

1 Answer

0 votes
by

Explain the difference between the .detach() and remove() methods in jQuery.

The detach() and remove() methods are the same, except that .detach() retains all jQuery data associated with the removed elements and .remove() does not. detach() is therefore useful when removed elements may need to be reinserted into the DOM later.

Related questions

0 votes
asked Nov 20, 2020 in JQuery by sharadyadav1986
0 votes
asked Nov 17, 2020 in JQuery by rajeshsharma
...