I would like to trigger something once (and only once) a user has scrolled down 100 pixels from the top.
In the past I was given this code, but it doesn't seem to be working?
window.onscroll = function() {
var scrollLimit = 100;
var scrollValue = document.body.scrollTop;
if (scrollValue >= scrollLimit) {
alert("x")
}
};