Calculates the offset and dimensions of the given element


element HTMLElementThe element to calculate dimensions for.

ReturnsObject An object with top, left, width and height fields in pixels.


<div id="foo" style="position: absolute; top:10px; left: 10px; height: 200px; width: 200px"></div>
    var fooBox =$("#foo"));
    console.log(fooBox); // { top: 10, left: 10, width: 200, height: 200 }
In this article
Not finding the help you need? Improve this article