Right now I'm using this:
$('#go-to-top').each(function(){
$(this).click(function(){
$('html').animate({ scrollTop: 0 }, 'slow'); return true;
});
});
which doesn't work in Chrome, and in Opera I get a small flicker: the browser instantly scrolls to the top, then back to the bottom and then it begins to scroll slowly back to top, like it should.
Is there a better way to do this?
maybe something like
aswell as the html one.
edit >
should cover all browsers!
It works cross-browser