<< Back to All Posts
<div> <p><a href="link">Some Link</a></p> </div>
output:
<p><a href="link">Some Link</a></p>
use replaceWith() to replace an element with its contents:
$('div').replaceWith(function(){ return $(this).contents(); });
<< Back to All Posts
Prince Gill
output:
Lance Carletti
use replaceWith() to replace an element with its contents: