Last Updated: February 25, 2016
·
3.109K
· okcoker

Use window.pageYOffset instead of window.scrollY

For better cross browser compatibility. Same goes for pageXOffset over scrollX.