默认的页内跳转效果太突兀,感觉还是慢慢地滑动比较直观,容易理解
$('.btn').click(function(e){
e.preventDefault();
var jumpId = $(this).attr('href');
$('body, html').animate({scrollTop: $(jumpId).offset().top}, 'slow');
});
默认的页内跳转效果太突兀,感觉还是慢慢地滑动比较直观,容易理解
$('.btn').click(function(e){
e.preventDefault();
var jumpId = $(this).attr('href');
$('body, html').animate({scrollTop: $(jumpId).offset().top}, 'slow');
});