Is there any way in javascript to check if web page has been vertically scrolled? specially for Internet Explorer? I need to get the mouse position in IE but using jQuery event e.pageY it gives correct value when page is not scrolled but when page is scrolled down then it gives wrong position.
+2
A:
Check out this question if you are comfortable with using jQuery:
Peter Jaric
2010-06-19 07:57:40
thanks a lot. my problem is solved. i just need $(window).scrollTop.
Muzzammil Hussain
2010-06-19 08:19:06
How about an upvote then? :) And if my link led you to the answer, maybe you could check the accepted check mark?
Peter Jaric
2010-06-19 08:28:37
@snowlord - He can't upvote, not enough rep yet :) Though I can, +1.
Nick Craver
2010-06-19 09:59:15
@Nick: lol, thanks :)
Peter Jaric
2010-06-19 10:43:13
+2
A:
In case any future googlers find this, the quick example is:
if(!$(window).scrollTop()) { //abuse 0 == false :)
alert("You are at the top of this window");
}
Nick Craver
2010-06-19 11:06:17