Jump to content
Search Community

GSAP OnComplete not being triggered, edge case?

James135 test
Moderator Tag

Go to solution Solved by James135,

Recommended Posts

3 hours ago, James135 said:

Take a look at this Pen's JS, the onComplete function should be getting triggered, but it isn't. However, the onUpdate is being triggered.

Seems to be working perfectly - that tween animates everything all the way to the left, and you've got scrub: true, so the scrollbar basically moves the playhead on the tween, thus it wouldn't fire the onComplete until you scroll ALL the way down. See what I mean? Were you expecting it to fire every time you stopped scrolling? 

 

Sounds like you found the solution with the scrollEnd event. 👍

Link to comment
Share on other sites

Yeah, GSAP is elegantly coded

 

14 hours ago, GreenSock said:

Seems to be working perfectly - that tween animates everything all the way to the left, and you've got scrub: true, so the scrollbar basically moves the playhead on the tween, thus it wouldn't fire the onComplete until you scroll ALL the way down. See what I mean? Were you expecting it to fire every time you stopped scrolling? 

 

Sounds like you found the solution with the scrollEnd event. 👍

 

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