I have used a scrollTop function in jQuery for navigating to top, but strangely \'the smooth animated scroll\' stopped working in Safari and Chrome (scrolling w
// if we are not already in top then see if browser needs html or body as selector
var obj = $('html').scrollTop() !== 0 ? 'html' : 'body';
// then proper delegate using on, with following line:
$(obj).animate({ scrollTop: 0 }, "slow");
BUT, best approach is to scroll an id into your viewport using just native api (since you scroll to top anyway this can be just your outer div):
document.getElementById('wrapperIDhere').scrollIntoView(true);