$('#main').wrapInner('<div></div>')
.wrap() you just remove with .unwrap()
.unwrapInner() seems to be not in the library.
.unwrap() not working with .wrapInner()
Somebody faced the same problem? Your help is very appreciated.
First, you can put a marker class on your div elements (it probably won't matter, but just in case):
$("#main").wrapInner('<div class="wrapper"></div>'); // Notice class=wrapper
Then you can unwrap it using contents().unwrap():
$("#main > .wrapper").contents().unwrap();
Jsfiddle: http://jsfiddle.net/prankol57/wkvyzre6/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With