JSFiddle - React, Tailwind, and code Playground
HTML
<p>some text</p>
<button>Create me</button>
<div id="area"></div>
JavaScript
$(document).ready(function() {
$("button").click(function() {
$("#area").html("<p>click me</p>");
});
$("p").on("click", function() {
alert($(this).text());
});
});