5 ms·
Plugin author here, I can help clarify that. The scrolling is throttled so that all the checks aren't run with every single scroll event, as that would choke e
by imakewebthings 16y ago
Plugin author here, I can help clarify that. The scrolling is throttled so that all the checks aren't run with every single scroll event, as that would choke everything. So the small delay you see there is some 0-100 millisecond value while it hasn't triggered the event yet.
You can change the throttle by setting $.waypoints.settings.scrollThrottle = 50, or whatever number you like, to try to reduce flickers in cases like these. Just be aware its a balance you'll be striking with executing more scroll checks. But all the selectors and offset values are cached so the performance should still hold up should you choose to lower this value.
- patrickaljord 16y agoReminds me of this, I guess you read it already: http://ejohn.org/blog/learning-from-twitter/ http://ejohn.org/blog/learning-from-twitter/
- imakewebthings 16y agoBased the throttling on that exact post.
- karl_nerd 16y agoI love what you did with this and i will definitely play around with it. This functionality should really be built into the browser in my opinion. I was thinking, for performance reasons, did you try ditching the $(window).scroll and go with this? http://jsbin.com/eciwu4/edit http://jsbin.com/eciwu4/edit