Jump to content
Search Community

Making Multiple Things Happen at Once Using Scrolltrigger with a Timeline

Samalander test
Moderator Tag

Go to solution Solved by GreenSock,

Recommended Posts

  • Solution

You're gonna love the position parameter

 

 

In your case, you've got several options: 

tl.to(".p1", {opacity: 1, duration: 1})
  .to(".p2", {opacity: 1, duration: 1})
  .to(".p3", {opacity: 1, duration: 1}, "<") // <- position parameter to the rescue

Or if you're fading them both in at the same time, you can just use the same tween:

tl.to(".p1", {opacity: 1, duration: 1})
  .to(".p2, .p3", {opacity: 1, duration: 1}) // <- selector text can target multiple elements

Does that clear things up? 

  • Like 2
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...