72

函数防抖和节流

 6 years ago
source link: https://juejin.im/post/5b651dc15188251aa30c8669
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
在前端开发的过程中,我们经常会需要绑定一些持续触发的事件,如 resize、scroll、mousemove 等等,但有些时候我们并不希望在事件持续触发的过程中那么频繁地去执行函数。 通常这种情况下我们怎么去解决的呢?一般来讲,防抖和节流是比较好的解决方案。

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK