kCeb Posted August 25, 2022 Share Posted August 25, 2022 Hi, I'm trying to figure out how to disable the animation on the first image on first scroll. When you refresh the page, the first image animates. How to achieve this? See the Pen XWEwpyq by kevin-cebedo (@kevin-cebedo) on CodePen Link to comment Share on other sites More sharing options...
Solution daniel.mt Posted August 25, 2022 Solution Share Posted August 25, 2022 Hi, In this case you could check before applying .fromTo tween if the selector has opacity. See the Pen 3412541bd1c27591de127aeb3c5f8eb4 by danielmtd (@danielmtd) on CodePen For more details on how to use getProperty https://greensock.com/docs/v3/GSAP/gsap.getProperty 1 Link to comment Share on other sites More sharing options...
kCeb Posted August 25, 2022 Author Share Posted August 25, 2022 Ooooh yes. Haven't thought about the opacity Thank you so much Daniel! 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