Reputation: 131
Trying to take position of the top (window top x=0 and y=0) visible part of the web page.
Please see this image
Upvotes: 3
Views: 1147
Reputation: 8580
Common:
var X - $(window).screenX();
var Y - $(window).screenY();
IE:
var X = $(window).screenLeft();
var Y - $(window).screenTop();
Hope it helps you!
Upvotes: 2
Reputation: 82231
You need:
$(window).scrollTop();
Using Javascript:
document.documentElement.scrollTop || window.pageYOffset
Upvotes: 9