Jump to content
Search Community

Scrolltrigger not working at all times

_Musiku test
Moderator Tag

Go to solution Solved by _Musiku,

Recommended Posts

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

  • _Musiku changed the title to Scrolltrigger not working at all times

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...