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

Use window.pageYOffset instead of window.scrollY

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