var scrollTmp; window.onscroll = function() { clearTimeout(scrollTmp); scrollTmp = setTimeout(onScrollStop, 3E3); } function onScrollStop() { alert(true); }