Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于防抖(debounce)函数 #69

Closed
bfchengnuo opened this issue Jan 15, 2022 · 0 comments
Closed

关于防抖(debounce)函数 #69

bfchengnuo opened this issue Jan 15, 2022 · 0 comments
Labels

Comments

@bfchengnuo
Copy link
Owner

在浏览器中,有很多事件比如window的onresize 鼠标的mousemove 以及滚轮事件wheel等,他们触发的很频繁,这个时候函数没必要一直执行。函数防抖就是让事件触发的n秒内只执行一次,如果连续触发就重新计算时间

see:YvetteLau/Step-By-Step#10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant