JSFiddle - React, Tailwind, and code Playground

HTML

<!-- JSP fragment. Hard-coded in the "Hello" value, in
     real life you'd put the S2 tag here, it's just JSP. -->

<div id="hello" style="display: none;">Hello</div>

<a id="go" style="text-decoration: underline; color: blue;">Click me to replace contents</a>
<br/><br/>
<div id="outputHere" style="border: 2px solid red; padding: 1em;">Output here</div>

JavaScript

$(function () {
    $("#go").click(function() {
        var $div = $("<div className='newer'>").html($("#hello").html());
        $("#outputHere").html($div);
    });
});