javascript - How to remove a div without removing its children? -
for example http://jsfiddle.net/skpfknxo/
it removes div #test along children #test2 , #test3. want remove #test without removing children.
how done?
$( "button" ).click(function() { $( "#test2" ).unwrap(); }); the .unwrap() method removes element's parent. inverse of .wrap() method. matched elements (and siblings, if any) replace parents within dom structure.
Comments
Post a Comment