Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
jkellner

onReverseComplete (setting Scope)

Recommended Posts

I have a project that I am building and unbuilding cards to a screen based on User feedback. My goal is:

  1. animate in the cards (TimeLine.staggerFrom)
  2. user chooses new set
  3. animate out the cards (using Reverse)
  4. onReverseComplete (load the new set of cards)
  5. Empty the container of cards
  6. Append the new HTML
  7. Animate in the new cards

 

But the issue is my reverse complete is firing before the timeline is complete... I am guessing it is happening when a child card completes, I would like it to happen when the whole timeline reverse complete

See the Pen GPbwzr?editors=1111 by jkellner (@jkellner) on CodePen

Link to post
Share on other sites

Try to use the timeline's onReverseComplete event.

 

onReverseComplete on the stagger* callbacks will be fired on every subsequent tweens (for every box).

 

See the Pen QzXzXX?editors=0010 by mm00 (@mm00) on CodePen

 

  • Like 4
  • Thanks 1
Link to post
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.

×