ExampleRemove the parent element of all p elements:
Try it yourself » |
The unwrap() method removes the parent element of the selected elements.
$(selector).unwrap() |
![]() |
Try it Yourself - Examples |
Wrap
and unwrap an element
How to toggle between wrapping and unwrapping an element.