Jump to content
Search Community

ScrollToPlugin autoKill Call back

icraft-websites test
Moderator Tag

Go to solution Solved by GreenSock,

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

Hey, I've been using the scrollTo plugin extensively throughout my web app and up until now its been running great.

I just came across a use case that requires an event to fire when the user manually scroll's while the scrollTo plugin is auto scrolling. 

 

Does scrollTo have a callback that fires when the scroll is killed by a manual scroll? I've tried onComplete but that only fires if the whole auto scroll finishes before any manual scroll event.

 

Thanks 

 

Josh

Link to comment
Share on other sites

  • 1 month later...

Yes indeed - you can define an onAutoKill callback in the scrollTo object, like:

TweenLite.to(window, 2, {scrollTo:{y:300, onAutoKill:yourFunction}});

Is that what you're looking for?

Was exactly was I was looking for. Had to update my version of the plugin though. Thanks!!!!! 

 

Couldn't find this in the documentation though. 

 

Cheers! 

Josh

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