0 votes
410 views
in jQuery by

What is the difference between detach() and remove() method in jQuery?

1 Answer

0 votes
by (4.4k points)

There are following difference among detach(), remove() and hide() methods:-

detach():- detach() removes the matched elements, including all text and child nodes. This method stores all the data associated with the element. So it can be used to restore the element's data as well as event handlers.

remove():- remove() method is used to remove matched elements, including all text and child nodes. However, in this case only the element's data can be restored, not its event handlers can't.

hide():- hide() sets the matched element's display to none.

Share:- Whatsapp Facebook Facebook


Welcome to Developerhelpway Q&A, where you can ask questions and receive answers from other members of the community.

Categories

...