Add option to stop animation if the user natively scrolled #67
|
I can make a PR if you want or do you prefer to do it? |
|
@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 |
|
This is implemented. To cancel on user scroll pass |
It would be cool to have an
interruptoption. 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.