Jump to content
Search Community

take 4 duration to appeared and 1 duration to disappeared gsap scrollTrigger

Nora test
Moderator Tag

Recommended Posts

Hey there. Sure! You can use the callbacks to trigger an animation instead of toggle Actions. That will give you more control over differing entrance and exit animations.

for example - something like this.
 

ScrollTrigger.create({
 onToggle: (self) => {
   gsap.to(element, {
     opacity: self.isActive ? 1 : 0,
     duration: self.isActive ? 4 : 1
   })
 },
})

 

  • Like 1
Link to comment
Share on other sites

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...