Hello,
I want the images on sections TWO and THREE to be revealed by changing the flex-grow on .scrubScroll__dark to 0.
So it would be:
Scroll to section TWO
Pin section, as user scrolls down reveal image (.scrubScroll__dark flex-box to 0)
Keep scrolling and section THREE appears on top of section TWO
I want the same funcionality for section THREE.
I tried using onEnter and onEnterBack to call the function to change the flex-grow value, but
Unfortunately, I don't see any of your tries reflected in the codepen.
Try thinking of what needs to happen for this to work.
First and foremost you will have to make sure that the pinning happens for longer than it does now and also for longer than the tweening part. Since the tween is being scrubbed over the course of a window's height, you want the pin to last for that duration plus another window's height for the scroll-over effect - making the pin's end "+=200%".