getBoundingClientRect
method
let element = document.getElementById("some-id"); // for jQuery $("#some-id")[0];
let elementRect = element.getBoundingClientRect();
returns DOMRect
ObjecttooltipRect: DOMRect
bottom: -5
height: 20
left: 1093.5625
right: 1149.59375
top: -25
width: 56.03125
x: 1093.5625
y: -25
__proto__: DOMRect
bottom: -5 //invoked
height: 20 //invoked
left: 1093.5625 //invoked
right: (...)
top: (...)
width: (...)
x: (...)
y: (...)