Skip to main content

.detach()

Detaches all matched elements from te DOM tree and returns them in a DoMini object.

Difference between .detach() vs .remove()
Both functions remove the elements from the DOM, but.detach() will keep the DoMini related data and event listeners. .remove() clears all DoMini related data and even listeners.

.detach(): DoMini

// Detach all paragraphs
var detached = $("p").detach();