jquery-scrollspy
jquery-scrollspy copied to clipboard
Incompatible with Scroll-To Functionality
Hi there. I'm using both scroll-to functions and scrollSpy in a current project, and have noticed they are of course incompatible.
Because scrollSpy listens to window scroll, and scroll-to anchors cause the window to scroll, weird jumping happens, etc. I'm aware there's a throttle, and keeping scrolls well within the throttle interval has prevent most weird stuff, but there are still edge cases that cause weird effects.
Is there currently a way to stop scrollSpy from listening for a set period of time? Would be really useful to be able to setTimeout some var to stop scrollSpy listening while scroll-to stuff is happening.
Eg:
scrollSpyWatching = false;
setTimeout(function() { scrollSpyWatching = true}, 500);