Hold scrolling of page until an animation is finished.

Hi everyone,

I’m working on a scroll-triggered text animation with 2 lines inside a box, similar to a NY Times example (see below). The text should scroll over a background image, pausing the page scroll until the animation finishes.

I’ve managed to make the text box stick while the text scrolls, but the page itself glitches and jumps when I try to stick everything.

I’ve tried Sticky Position, animation, and adjusting scroll speed, but no luck so far.

Any tips or suggestions would be greatly appreciated. Thanks!

Example:

https://www.nytimes.com/interactive/2024/10/10/opinion/nuclear-weapons-us-price.html

Screen recording for ref: