So. I am making a page with buttons; pressing the buttons smoothly scrolls the page (actually the container) to those located further to the right. This is done using container.scrollLeft.
Now I'm trying to make sure that when you manually scroll the user (scroll bar, mouse wheel, arrow keys, etc.), automatic smooth scrolling stops instantly.
I tried to do this with help container.addEventListener('scroll',StopScroll,false);, but it works for any scroll, even done with code, and not just for the user. Is there a way to detect only user scrolling? Or maybe a workaround?
In addition, I would prefer not to use jQuery, but I will switch to it if this is the only way.
source
share