JSFiddle - React, Tailwind, and code Playground
by krish
HTML
<div id="div1" style="height:50px;width:50px;background:black;">
</div>
<p>click the above div to get the position</p>
JavaScript
$('#div1').click(function(){
var p = $(this);
var position = p.position();
alert('left'+' '+ position.left);
alert('top'+' '+ position.top);
});