点击回到顶部
$("a").on('click',function(){
$("html:not(:animated),body:not(:animated)").animate({scrollTop:0},2000);
// 阻止默认事件
return false;
})
点击 浏览器滚动到某个位置
$(".register-now").click(function(){
// 获取当前元素偏移坐标
var awards = $('.trading_row2').offset().top;
$("html:not(:animated),body:not(:animated)").animate({scrollTop:awards},'slow');
})