Jump to content
Search Community

Multiple autoAlpha to multiple elements

Nasr Galal test
Moderator Tag

Recommended Posts

any simpler way to do this?
as the '#note3' will not show up

plus, it is a lot repetitive!

tl
        .to('#note1', 0.8, { autoAlpha: 1, }, 5)
        .to('#note1', 0.8, { autoAlpha: 0, }, 10)
        .to('#note2', 0.8, { autoAlpha: 1, })
        .to('#note2', 0.8, { autoAlpha: 0 },15)
        .to('#note3', 0.8, { autoAlpha: 1 })
        .to('#note3', 0.8, { autoAlpha: 0 }, 20)
        .to('#note4', 0.8, { autoAlpha: 1, })
        .to('#note4', 0.8, { autoAlpha: 0, }, 25)
        .to('#note5', 0.8, { autoAlpha: 1, })
        .to('#note5', 0.8, { autoAlpha: 0, }, 30)
        .to('#note6', 0.8, { autoAlpha: 1, })
        .to('#note6', 0.8, { autoAlpha: 0, }, 35)

 

Link to comment
Share on other sites

7 minutes ago, Nasr Galal said:

Also found out that using `delay` is more stable

It shouldn't be. Please provide a minimal demo of your situation (including Vue) for us to check out. CodePen has a handy Vue editor you should use.

 

By the way, we recommend that you include the duration inside of the vars parameter so that you can use features like GSAP's defaults. The syntax that you're using may not be supported in a (distant) future version of GSAP.

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...
2 minutes ago, Nasr Galal said:

but in my vue cli localhost it does not!

That tells us that it's some environmental issue :) Good luck figuring out the cause, hah.

 

By the way it's best to avoid setting transforms outside of GSAP for elements that you manipulate with GSAP. It's one of the most common GSAP mistakes:

 

 

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