I want to call a function right after a scroll ends. I have tried a load of different things, none of which have quite worked, and then I came upon this solution in
have you tried putting scrollEnded() on top of bodyScroll()?
function scrollEnded(){
console.log('scrollEnded. Now do something astounding.');
};
function bodyScroll() {
console.log('scrolling.');
if (scrollTimer != -1)
clearTimeout(scrollTimer);
scrollTimer = window.setTimeout('scrollEnded()', 500);
};