JSFiddle - React, Tailwind, and code Playground
HTML
<html>
<body>
<label id="lbl"></label>
<div id="foo"></div>
</body>
</html>
CSS
#foo {
position: absolute;
width: 100px;
height: 100px;
background: red;
}
JavaScript
var pos = $("#foo")
.hide()
.offset({left: 100, top: 100})
.offset({left: 100, top: 100})
.offset({left: 100, top: 100})
.show()
.offset();
$("#lbl").text(pos.left + "," + pos.top);