JSFiddle - React, Tailwind, and code Playground
HTML
<div id="apnd1"></div>
<button type="button" id="btn11">Add product</button>
JavaScript
$(document).ready(function(){
$("#btn11").click(function(){
var nw="<div class='product_input'><input type='text'/><br/>";
nw+="<button type='button' class='btn12'>Add category</button>";
nw+="</div>";
$("#apnd1").append(nw);
});
$("#apnd1").on("click",".btn12",function(){
alert("jhfj");
});
});