JSFiddle - React, Tailwind, and code Playground

by steveseguin

HTML

<div class="row">
    div
    <h2><asp:Literal ID="categoryTitle" runat="server"></asp:Literal>H2</h2>
    <img class="tree js-catTree" id="treeContainer" runat="server"/>
</div>

<button id="replaceIt">Replace It</button>

JavaScript

$('#replaceIt').click(function() { replaceIt() });

function replaceIt(){
  $('div').replaceWith(function() {
   return $('img', this);
  });
}