How to animate multiple texts on scroll?

I’ve stumbled accross this cool text animation and I want to use it on multiple texts. But then I noticed that the effect applies only to one text. I changed the ids for each text, but still it works just for one. Any ideas what should I change in the code so it would work on multiple texts?

You can find the code here


I can’t code right now, so I’m unable to send you the solution. But all you need to do is select all the elements that will change using the method querySelectorAll (which will return an array-like of type NodeElements) and, forEach element in this array-like, apply the desired animation.

I will try this, thank you

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.