JSFiddle - React, Tailwind, and code Playground
HTML
<body>
<div id="newdiv"></div>
<input type="button" id="put_new" value="put new html" />
</body>
JavaScript
$("#newdiv").on("click", "#newhtml", function(){
alert("I'm the NEW one!");
});
$("#put_new").on("click", function(){
$("#newdiv").html("<input type = 'button' id = 'newhtml' value = 'click on me'/>");
});