NOTE / Jquery

Use scrollTop

將捲動軸滑動到指定地點

先取得你要移動地方的id或是class之後再用.offset().top語法取得位置。

var scrollid = $(this).attr('id');
var $body = $('html,body');
$body.animate({
  scrollTop: $("#" + scrollid).offset().top
}, 800, "easeOutCubic");

REFERENCE / 7

Loading