Trying to take position of the top (window top x=0 and y=0) visible part of the web page.
Please see this image

You need:
$(window).scrollTop();
Using Javascript:
document.documentElement.scrollTop || window.pageYOffset
Working Fiddle
Common:
var X - $(window).screenX();
var Y - $(window).screenY();
IE:
var X = $(window).screenLeft();
var Y - $(window).screenTop();
Hope it helps you!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With