jQuery scroll() detect when user stops scrolling

前端 未结 13 1463
情歌与酒
情歌与酒 2020-11-22 02:17

Ok with this..

$(window).scroll(function()
{
    $(\'.slides_layover\').removeClass(\'showing_layover\');
    $(\'#slides_effect\').show();
});
13条回答
  •  别那么骄傲
    2020-11-22 02:53

    function scrolled() {
        //do by scroll start
        $(this).off('scroll')[0].setTimeout(function(){
            //do by scroll end
            $(this).on('scroll',scrolled);
        }, 500)
    }
    $(window).on('scroll',scrolled);
    

    very small Version with start and end ability

提交回复
热议问题