JSFiddle - React, Tailwind, and code Playground
by Brannie19
HTML
<div class="button three"></div>
<div id="Content"></div>
CSS
.button.three {
width: 50px;
height: 50px;
background: blue;
}
.textBlock {
background: orange;
height: 20px;
width: 20px;
}
JavaScript
$(document).ready(function () {
$(".button.three").click(function() {
$("<div class='textBlock'></div>").appendTo("#Content");
});
$(".textBlock").click(function() {
alert("2");
});
});