Zoker Posted January 18, 2022 Share Posted January 18, 2022 Hi there, I just tried to create a scroll trigger, which will change the opacity and position based on the scroll progress: gsap.from('.a-f-r', { scrollTrigger: { trigger: ".a-f-r", start: "top bottom", end: "center bottom", scrub: 1 }, x: 1000, opacity: 0 }); Now the issue is, that this works sometimes and sometimes does not. When I reload the page the chances are 50/50 that it works. When it does not work, the opacity just stays 0 and the element is hidden. The page does not use any caching yet or any other optimization. The site can be found here: https://shorturl.at/bjmzO The above code is located in the animation.js file Is there any way I can make this reliable? Thanks! Link to comment Share on other sites More sharing options...
OSUblake Posted January 18, 2022 Share Posted January 18, 2022 Welcome to the forums @Zoker Please provide a minimal demo that shows the issue. We can't answer a problem we can't see and we need to be able to experiment with the code. Link to comment Share on other sites More sharing options...
Zoker Posted January 22, 2022 Author Share Posted January 22, 2022 Hi @OSUblake, Thanks for the warm welcome! Sure I created a demo here, that seems to have the same issue: See the Pen abLeqra by Zoker (@Zoker) on CodePen Hope that helps! Link to comment Share on other sites More sharing options...
Solution Cassie Posted January 22, 2022 Solution Share Posted January 22, 2022 Hey @Zoker Looks like it's down to a regression in the latest version. Sorry about that!Fixing options! Step back the version to 3.8 Use the latest beta Fix it for the current version by setting lazy: false on your .from() tween(s). See the Pen NWaQYVY?editors=1010 by GreenSock (@GreenSock) on CodePen (You'll also need to load your GSAP script before the scrollTrigger script in your codepen JS panel.) 3 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