Jump to content


onReverseComplete (setting Scope)

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

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 comment
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 comment
Share on other sites

Boom!  I knew it was something simple... Thanks!


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.