JSFiddle - React, Tailwind, and code Playground
HTML
<div id="test">
</div>
<div id="secondblock">
</div>
CSS
#test{width:200px;height:auto;min-height:50px;background:#FFF}
#newel{width:90%;margin:10px;background:#aaa;height:30px}
#secondblock{width:200px;height:auto;min-height:20px;background:#2196f3;margin-top:20px}
JavaScript
$( "#test" ).append( '<div id="newel">Hello</div>' );
$("#secondblock").click(function () {
alert(console.log($('#newel').text()));
});