-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add option to stop animation if the user natively scrolled #67
Comments
It's really requested a lot. I'll add this asap. |
I can make a PR if you want or do you prefer to do it? |
Ok, I might modify it a bit but will surely save time. |
@flesler little question. At the moment the done callback is only fired when the animation completes. This means that if With the interrupt option, do you want the callback to be called when the animation is interrupted or not? |
If not, we could make Or.. add a |
I thought of that as well when thinking about this issue, I'm not sure. What do you think. |
I think adding onStop is better. It would be called on interrupt or if .stop() is called programmatically during the animation. I already got it working. Tomorrow I will make a PR for you to review or take ideas. |
This seems to work in Chrome: https://stackoverflow.com/questions/4034659/is-it-possible-to-animate-scrolltop-with-jquery/20699124#20699124 |
Expanded the demo with more settings Renamed CHANGELOG Updated ignore fields Updated package.json to comply with jquery plugins standard
This is implemented. To cancel on user scroll pass |
It would be cool to have an
interrupt
option. If set to true, it will interrupt the animation if the user scrolled while it was animating. If you agree with it, I can make a quick PR with it added.The text was updated successfully, but these errors were encountered: