Query .detach()Removes elements while preserving event handlersquery-detachcomponentQuerypage.jsDOM ManipulationUnlike remove(), detached elements can be reattached with events intact["query","dom","detach","remove","preserve","events"].detach()Example