bcavs Posted August 10, 2022 Share Posted August 10, 2022 I am trying to create an animation that has text grow on scroll and I have it slightly working right now but have a problem with the responsiveness of the text. The text is smaller on mobile and the animation is working when scrolling down however when I scroll past the end of the animation then back up it reverts the text back to the desktop sizes. I'm pretty new to gsap so probably missing something obvious here but I can't figure out the solution so any help would be appreciated! Thanks! See the Pen xxWJgQj?editors=0111 by bcavenagh (@bcavenagh) on CodePen Link to comment Share on other sites More sharing options...
Solution Cassie Posted August 10, 2022 Solution Share Posted August 10, 2022 Not entirely sure what's going on here, but I would go for matchMedia as a solution if I were you. See the Pen GRoyWBd by GreenSock (@GreenSock) on CodePen That's usually the route to go when you want different results with scrollTriggers on mobile and desktop. We have a release coming soon where you'll be able to do ternery stuff like this though. 👀 1 Link to comment Share on other sites More sharing options...
bcavs Posted August 10, 2022 Author Share Posted August 10, 2022 Ahh perfect, that's exactly what I was looking for. Thank you! 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