Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
icraft-websites

ScrollToPlugin autoKill Call back

Go to solution Solved by GreenSock,

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 post
Share on other sites

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?

  • Like 2
Link to post
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 post
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.

×