I’m using Ariel Flesler’s awesome scrollto plugin. But I want to determine when the plugin has finished scrolling. The scrollto speed is set to 800 on my page. How can I do that?
I’ve tried:
isScrolling = true;
jQuery(listWrapper).scrollTo(theId, 800);
isScrolling = false;
But it seems as though isScrolling = false gets set before the scrolling completes.
I have some JavaScript attached to the scrollto event in addition to this. The scrolling slows down to a painful speed because it’s trying to do smooth scroll and run the scroll event at the same time. I was hoping to effectively disable the scroll event while it’s scrolling, and re-enable it when the scrolling has completed.
The plugin has a callback function that is called when the animation is over: