Jump to content
Search Community

Help with Staggerfromto delay

mattdown test
Moderator Tag

Go to solution Solved by PointC,

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

Hi all,

 

I'm struggling to work out how I add a slight duration increase of each item in a staggerfromto animation.

 

As each of these list items comes into view, I need to increase the duration it takes to settle into the final position so it gives the impression that the top item is slightly lighter in weight and therefore takes a bit longer to drift down.

 

Hope that makes sense and any help would be really appreciated.

 

See the Pen bgzVZN by mattdown247 (@mattdown247) on CodePen

Link to comment
Share on other sites

  • Solution

Hi mattdown :)

 

If you want to change the duration of each element's tween, I don't think a stagger is the best choice here. I'd recommend using jQuery's each() method to create a tween for each element. You can then use the index of each element to add some time to the tween duration.

 

It would be about the same as this demo I made as an answer to another forum question:

 

See the Pen EgWNqy by PointC (@PointC) on CodePen

 

Hopefully that helps.

 

Happy tweening.

:)

  • Like 2
Link to comment
Share on other sites

Just one more quick question.....

 

Now that I have altered the pen to use your method of for each etc, how can I make the animation start from the last item in the list instead of the first?

 

Thanks

Matt

 

Update:  Think I worked it out by using .reverse()  before the .each()

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