Hi All,
I've begun implementing this in a looped setting and I've run in to a new issue (lost the locking again!).
I've created a forEach() loop for each <section> (it was just a single section in the prior example)
When scrolling slowly, and each <section> is reached, the Observer pauses the scroll and plays a section-specific animation in that section (I changed to h2 color animation for easier visualization).
However, if you scroll quickly you can bypass the first sections and get all the way to the last one.
It does lock on the last section but the skipping defeats the purpose.
So I've now lost the scroll locking I was seeking!
Codepen for demonstration:
https://codepen.io/SeeMax/pen/KKbyQRp
I tried creating a single, unique function for each section (without the loop, with unique var names, etc. but it still failed the test).
I thought maybe it was fastScrollEnd but setting that to false doesn't solve it.
I feel like there is an issue with the observer in the loop or something similar but I'm not able to sus out the exact issue.
Any further assistance would be greatly appreciated.
Cheers.