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(); }); 

demo

the .unwrap() method removes element's parent. inverse of .wrap() method. matched elements (and siblings, if any) replace parents within dom structure.


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -