JSFiddle - React, Tailwind, and code Playground
HTML
<div class="container">
<button id="btn1">Click Me</button>
</div>
JavaScript
jQuery(document).ready(function(){
jQuery('#btn1').click(function(){
jQuery(".container").html('<button id="btn2">Now Click Me</button>');
});
});
jQuery('body').on('DOMNodeInserted', '#btn2', function () {
jQuery('#btn2').click(function(){
jQuery(".container").html('<p>It Worked</p>');
});
});