This repository has been archived by the owner on Dec 26, 2023. It is now read-only.
updateThrottle
Karl edited this page Apr 16, 2018
·
2 revisions
Set the interval in ms
that the update method is called during window
resize and document
scroll.
In order to keep the slider responsive, the dimensions of the various DOM elements that make it need to be re-measured when resizing the window or scolling the document. This remeasurement can reduce performance so the instance will throttle the callback to fire only after a set interval instead of every few milliseconds.
Higher values increase performance at the cost of jerky repositioning / resizing of the DOM elements while lower values will provide smoother repositioning / resizing at the cost decreased performance.
Performance issues will usually only be noticed on lower-end devices.