jQuery scroll() detect when user stops scrolling

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

Ok with this..

$(window).scroll(function()
{
    $(\'.slides_layover\').removeClass(\'showing_layover\');
    $(\'#slides_effect\').show();
});
13条回答
  •  栀梦
    栀梦 (楼主)
    2020-11-22 03:02

    This should work:

    var Timer;
    $('.Scroll_Table_Div').on("scroll",function() 
    {
        // do somethings
    
        clearTimeout(Timer);
        Timer = setTimeout(function()
        {
            console.log('scrolling is stop');
        },50);
    });
    

提交回复
热议问题