Jump to content
Search Community

Can I specify the element variable?

qqignatqq test
Moderator Tag

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

You can't restart a timeline with a new target. That's why I suggested creating a tween/timeline in your click handler. You may want to make two timelines and play the appropriate one. You could also clear the main timeline on each click and repopulate it with new tweens upon click. You can check if it's active and quickly set the progress() to 1 before clearing so you don't get weird jumps. There are lots of possibilities. I don't really understand what you're doing so it's hard to give the best advice.

  • Like 1
Link to comment
Share on other sites

That's what I'm looking for. This is the form of sending the letter to the post office and I need the result of sending. The user can click on the "Send message" button several times and I need the animation to work every time. How can I reset the animation and restart it? I tried to put "clear()" in different places, but I failed.

If the form is valid and the "NO" animation is not finished yet, it should end and the "YES" message should appear

 

I'm sorry if I'm not clear, I'm using a translator.

 

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