Last active
January 15, 2018 10:58
-
-
Save tonysaffo/2f85ed57f698af23d79b9e806a76936a to your computer and use it in GitHub Desktop.
function - amount of scrolled pixels
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.onscroll = function() { | |
var scrolled = window.pageYOffset || document.documentElement.scrollTop; | |
document.getElementById('showScroll').innerHTML = scrolled + 'px'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment