JSREF

HTML DOM Element getBoundingClientRect()

Return the size of an element and its position relative to the viewport: