Jump to content
Search Community

Pause event edge case

tpav test
Moderator Tag

Go to solution Solved by OSUblake,

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

Let's say on an event such as a modal window opening you want to pause an animation that may or may not the on the page like in a case where you're A/B testing with and without animation. This works great.

if (typeof(myGSanimation) !== 'undefined') {
        myGSanimation.pause();
}

Now, what if there may be any number of animations being tested and you don't know what timeline to reference?

 

Is there a strategy for catching any Greensock timelines other than standardizing on a few timeline names and checking for 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...