window.addEventListener('scroll', () => { let body = document.body, timer clearTimeout(timer) !body.classList.contains('disable-hover') && body.classList.add('disable-hover') timer = setTimeout(() => { body.classList.remove('disable-hover') }, 500); }, false);