I'm looking for a technique using JQuery to remove an html tag (both opening and closing) without disturbing the content.
For example, given this markup...
<div id="myDiv">
Leave My Content alone!
</div>
I want to get to this...
<span id="#mySpan">
Leave My Content Alone!
</span>
What I've tried:
I thought about $("#myDiv").remove or $("#myDiv").replaceWith, but both of them destroy the contents of the tag.
As always, your assistance is appreciated!