How to get the number of pixels a user has scrolled down the page?
In pure javascript you can simply do like that: window.onscroll = function (e) { console.log(window.scrollY); // Value of scroll Y in px }; More infos (The Mozilla Developer Network) : onscroll scrollY