JSFiddle - React, Tailwind, and code Playground

HTML

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

JavaScript

$.get("/echo/html/", "", function(formToDisplay) {
    $("#test").dialog({
        autoOpen: true,
        modal: true
    }).html("<div class='clickHandle'>Test - click me</div> " + formToDisplay);
});
$(".clickHandle").on("click", function() {
    alert("Content clicked");
});