Scrollama is a modern and lightweight JavaScript library for scrollytelling using IntersectionObserver in favor of scroll events.
Using IntersectionObserver abstracts element-in-view detection and removes the need to monitor scroll events, which contribute towards a sluggish experience.
Callback that fires when the top or bottom edge of a step element enters the offset threshold.
Callback that fires when the top or bottom edge of a step element exits the offset threshold.
Callback that fires the progress (0 - 1) a step has made through the threshold.
Add data-offset to your step to replace the default offset for this element only.
This data-offset is set to 0.1. (10%).
Every props set to the step is sent to the scrollama component and can be used in the srollyteling.
Like data for D3js, image, url, mapbox lat/lng…
My Self Bragging page about my life and work.