What is the difference between screenX
/Y
, clientX
/Y
and pageX
/Y
?
Also for iPad Safari, are the calculations similar as on desktop—OR there is some difference because of viewport?
It would be great if you could point me to an example.
Here's a picture explaining the difference between pageY
and clientY
.
Same for pageX
and clientX
, respectively.
pageX/Y
coordinates are relative to the top left corner of the whole rendered page (including parts hidden by scrolling),
while clientX/Y
coordinates are relative to the top left corner of the visible part of the page, "seen" through browser window.
You'll probably never need screenX/Y