Answers

Question and Answer:

  Home  Ninjas Web Developer

⟩ Tell me what is the difference between detach() and remove() methods in jQuery?

Though both detach() and remove() methods are used to remove a DOM element, the main difference between them is that detach() keeps track of the last element detached, so that it can be reattached, while the remove() method does keep a reference of the last removed method. You can also take a look at the appendTo() method for adding elements into DOM.

 161 views

More Questions for you: