idiakite Posted November 17, 2023 Share Posted November 17, 2023 I'd like to update the text color when we scroll down but only chars by chars and not all the sentence in the same time. It worked well when I tried word by word but not with chars. What I am missing ? Thanks in advance See the Pen PoVEJMz by idrissdiakite (@idrissdiakite) on CodePen Link to comment Share on other sites More sharing options...
Solution PointC Posted November 17, 2023 Solution Share Posted November 17, 2023 That's not working because you have the same trigger, start time and duration for all the characters. You'd simply need a stagger to make this work. See the Pen 9a4e6975199dfb94f824ed859306297b by PointC (@PointC) on CodePen Just FYI - I'd look hard at SplitText as it makes this much easier and you won't have such a verbose HTML section. https://gsap.com/docs/v3/Plugins/SplitText/ Happy tweening. 1 Link to comment Share on other sites More sharing options...
idiakite Posted November 17, 2023 Author Share Posted November 17, 2023 Thanks a lot @PointC I'll look into it for sure ! Link to comment Share on other sites More sharing options...
Rodrigo Posted November 17, 2023 Share Posted November 17, 2023 Hi, Following @PointC's great advice, this demo uses SplitText with ScrollTrigger: See the Pen mdKWBmm by GreenSock (@GreenSock) on CodePen Hopefully this helps. Happy Tweening! 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now