[removed] do an action after user is done scrolling

后端 未结 5 1912
被撕碎了的回忆
被撕碎了的回忆 2020-12-01 06:55

I\'m trying to figure out a way to do this. I have a list of boxes, each about 150px high. I am using javascript (and jquery) and want that, after a user scroll

5条回答
  •  有刺的猬
    2020-12-01 07:16

    This would be a scenario, where vanilla JavaScript would be useful.

    var yourFunction = function(){
      // do something computationally expensive
    }
    
    $(window).scroll(function(){
      yfTime=setTimeout("yourFunction()",250);
    });
    

提交回复
热议问题