Easy Tutorial
❮ Sel Input Checked Prop Context ❯

jQuery unwrap() Method

jQuery HTML/CSS Methods

Example

Remove the parent element of all <p> elements:

$("button").click(function(){
    $("p").unwrap();
});

Definition and Usage

The unwrap() method removes the parent element of the selected elements.


Syntax


More Examples

Wrapping and Unwrapping Elements


jQuery HTML/CSS Methods

❮ Sel Input Checked Prop Context ❯