jQuery - bind event on Scroll Stop

前端 未结 4 2074
生来不讨喜
生来不讨喜 2020-12-01 03:07

If i want to bind an event on page scrolling i can use scroll();.

But how to fire when scroll() is ended up?

I would like to reprod

4条回答
  •  半阙折子戏
    2020-12-01 03:53

    You can verify if window.scrollY == 0

    $(window).scroll(function(){
      if (window.scrollY == 0) {
        //...
      }
    });
    

    But this event will be fired at every scroll.

提交回复
热议问题