Not sure of the best way to do this.
I have some code to automatically scroll, like this:
$("html, body").animate({
scrollTop: $('html, body').get(0).scrollHeight
}, (60000));
And I thought I could "stop" this scrolling by adding this:
$(window).on('scroll', function() {
$("html, body").stop();
});
But it looks like that second bit of code is firing when the first bit of code executes. So I'm not achieving anything.
I just need a way to have the auto-scroll stop when the user wants to manually scroll or move the scroll bar.
All ideas welcome. Thanks.