Finding the Scroll Position in IE10

It’s been so long since I had to deal with IE that I had forgotten about this, but IE does not support window.scrollX/window.scrollY; you have to use something like:
var top = typeof window.scrollY === "undefined” ? window.pageYOffset : window.scrollY;

One more teeny difference for the mobile web! :-)

8 Responses to Finding the Scroll Position in IE10

    • Steve S. says:

      Near as I can tell, it isn’t. I spent the last hour trying to get that to play nice across Chrome, Firefox and Safari, and ultimately window.scrollY was the only thing that worked for all of them.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

To respond on your own website, enter the URL of your response which should contain a link to this post's permalink URL. Your response will then appear (possibly after moderation) on this page. Want to update or remove your response? Update or delete your post and re-enter your post's URL again. (Learn More)