I have a few links across the page with the purpose of \"going to the top\", accomplished by scrolling the page to the top with a nice animation. I\'ve noticed that sometime
Figured it out! After looking around on the Internet I found something called Document.addEventListener
for Mozilla and document.onmousewheel
for IE and Opera that will catch scrolling events.
$('#gototop').click(function() {
$('body').animate({scrollTop:0},3000);
if(window.addEventListener) document.addEventListener('DOMMouseScroll', stopScroll, false);
document.onmousewheel = stopScroll;
function stopScroll() {$('body').stop()};
return false;
})