下午
问题:我的“回到顶部”按钮(向下滚动后的右下角)不是通过动画滚动到顶部,而是直接跳到顶部。
示例可以在http://www.pixsters.be上找到
我的html:
<a href="#top" id="homebacktothetop"><span>backtothetop</span></a>
我的js(jquery):
            // scroll to 0 when clicked
            $('#homebacktothetop').click(function () {
                $('body,html').animate({
                    scrollTop: 0
                }, 800);
                return false;
            });
        });
    
