JSFiddle - React, Tailwind, and code Playground
HTML
<div id=a>
<div id=inner_a></div>
</div>
<div id=b>
<div id=inner_b></div>
</div>
<div id=c>
<div id=inner_c></div>
</div>
<p></p>
CSS
div {
width: 100px;
height: 100px;
background: blue;
margin: 10px;
}
div > div {
width: 50px;
height: 50px;
background: green;
}
JavaScript
var pos = {x: 0, y: 0};
$(document).on("keyup click", function() { $("p").text(document.elementFromPoint(pos.x, pos.y).id); });
$(document).mousemove(function(event) { pos.x = event.clientX; pos.y = event.clientY; });