offsetY


offsetYnumberRead-only

Gets the distance in pixels between the pointer and the top edge of the element that triggered this event.

Scrolling the web page causes its elements to shift relative to the browser window. Therefore, two clicks on the same physical point of the screen return different offsetY values if the page is scrolled vertically in the meantime. But two clicks on the same point on the element return the same offsetY values even if the page is scrolled horizontally in the meantime.

Did this help?