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

Use window.pageYOffset instead of window.scrollY

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