JSFiddle - React, Tailwind, and code Playground

HTML

<div id="submit">
    <a href = "javascript:;" id="click1">Click here</a>
</div>

JavaScript

$('#click1').click(function () {
    $('#submit').html('this is new html <br /><a href="javascript:;" id= "click2">Click here 2nd</a>')

});

$('#click2').click(function(){
alert("all is well");
});