JSFiddle - React, Tailwind, and code Playground

HTML

<div id="what">
<div id="test">
    prem
</div>
</div>

JavaScript

$( document ).ready(function() {
    alert( "ready!" );
    var a = $("#test");
    $( "#test" ).remove();

        $('#what').html(a.html());
});