JSFiddle - React, Tailwind, and code Playground
HTML
<div class="wrapper"></div>
CSS
.box {
width:150px;
height:150px;
border-radius:3px;
background-color:#67e16a;
margin:20px;
box-shadow:0px 0px 30px -3px rgba(0,0,0,0.4), 0px 0px 4px 0px rgba(0,0,0,0.2);
cursor:pointer;
}
.box:active {
background-color:#000;
}
JavaScript
$(document).ready(function () {
setTimeout(function () {
$(".wrapper").html('<div class="box"></div>');
}, 1000)
$(".box").click(function () {
alert("A box was clicked!");
});
});