Share Posted January 23, 2015 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 More sharing options...
Share Posted January 23, 2015 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? 2 Link to comment Share on other sites More sharing options...
Author Share Posted February 23, 2015 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 More sharing options...
Share Posted February 23, 2015 Hi Josh, Thanks for the note. I have updated the docs to mention the onAutoKill callback http://greensock.com/docs/#/HTML5/GSAP/Plugins/ScrollToPlugin/ 2 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now