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