JSFiddle - React, Tailwind, and code Playground
HTML
<div id="outerId" class="outerHolder">
<div class="innerHolder"></div>
</div>
CSS
div{
width:100px;
height:100px;
background: yellow;
}
JavaScript
$("#outerId").on("click touchstart", "#newTag", function (e) {
alert("OK");
});
setTimeout(function() {
var products = '<div id="newTag">Hello World</div>';
$("#outerId").append(products);
}, 5000);