Check out the Underscore.js library’s “throttle” method.
http://underscorejs.org/#throttle
The example it gives is exactly what you’re asking about – limiting how often you have to handle scroll events.
Check out the Underscore.js library’s “throttle” method.
http://underscorejs.org/#throttle
The example it gives is exactly what you’re asking about – limiting how often you have to handle scroll events.