JSFiddle - React, Tailwind, and code Playground
HTML
<div id='to_copy' class="test_class" style="display: none;">
<span>Hello</span>
</div>
<div id='replace_here'></div>
<div id='replace_here_2'></div>
CSS
.test_class{
display: inline-block;
}
JavaScript
$(document).ready(function(){
var test1 = $('#to_copy').clone().show();
$('#replace_here').html(test1);
var test2 = $('#to_copy').show().clone();
$('#replace_here_2').html(test2);
$('#to_copy').hide();
});