I am trying to create a website that automatically scrolls to each section upon a single scroll action. This means that the code has to check if the page is scrolled up or s
This worked for me!
var ScrollDebounce = true; $('.class').on('scroll', function () { if (ScrollDebounce) { ScrollDebounce = false; //do stuff setTimeout(function () { ScrollDebounce = true; }, 500); } })