What is the best javascript solution to change a span to a div but keep its contents and the span's own classes. The classes are set so this can be hard coded.
<span class="my class">
<p class="content">
DYNAMIC CONTENT HERE
</p>
</span>
I want to use js to change this into
<div class="my class">
<p class="content">
DYNAMIC CONTENT HERE
</p>
</div>
Using replaceWith() seems to fail on IE as it is not supported.
Thanks.