_Musiku Posted March 30, 2022 Share Posted March 30, 2022 Hello, I have noticed my scrolltrigger scripts rarely work all the time. I usually have to refresh my pages X number of times before they perform the required action once, twice or maybe a lucky third time. I've come across a number of javascript reflow issue posts on stackoverflow in the my quests to solve the mysteries but I still run into the same issue every time I use scrolltrigger regardless of whether it's on nuxt or vanilla js. Anyone else who has faced the same? What might be the issue? Here is an example of my latest attempt... const lines = gsap.utils.toArray('.line') lines.forEach(line => { gsap.from(line, { scrollTrigger: { trigger: line, start: `top 90%`, end: `top 90%`, }, scaleX: 0, duration: .75, delay: .25, ease: 'power4.out', }); }) Link to comment Share on other sites More sharing options...
Solution _Musiku Posted March 30, 2022 Author Solution Share Posted March 30, 2022 I've found there's an issue affecting gsap version 3.8 that has been fixed. This link explains more https://greensock.com/forums/topic/30635-potential-regression-380-391-when-using-from-and-scrolltrigger/ 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