Jump to content
Search Community

Click Animation On Array Index i Overwrite Issue

AkhilRaja test
Moderator Tag

Go to solution Solved by OSUblake,

Recommended Posts

we can play animations when we click on the Nav "Slides 1 2 3..." and i want it to start as Slides[0]  index array element that is Slide A as already Played or Finished animation, and then we can click on Nav slides to play the animation


the issue im having is, i want when i click on Slide 2 3 4 or 5 it  should Overwrite gsap.set property Slides[0] by GSAPSlideTL
 

or in other words Slides[0] is not working when click animation to play GSAPSlideTL

thank you

See the Pen oNWMjRL?editors=0010 by AkhilRaja (@AkhilRaja) on CodePen

Link to comment
Share on other sites

35 minutes ago, OSUblake said:

Not sure I fully understand your question, but you probably shouldn't be making an animation just for the initial state.

 

 

 

 

Thank you @OSUblake 😊 you did understand and did what exactly i was trying to achieve.
 

GSAPSlideTL.reverse();
        if (!i) {
            GSAPSlideTL.reversed(false).progress(1);
            ActiveElement = GSAPSlideTL;
        }
        this.ActiveTL = GSAPSlideTL;

  

This code make it worked 🎉 thank you GSAP Team 😊

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