JSFiddle - React, Tailwind, and code Playground
HTML
<div id="main">
<div id="first"></div>
<div id="second"></div>
</div>
CSS
#first {
background: #ff0;
height : 100px;
}
#second {
position: absolute;
left: 50px;
top: 50px;
height: 50px;
width: 50px;
background: #f00;
}
JavaScript
$('#main').click(function (ev) {alert(ev.target.id);})