使用jquery滑动到锚点

( function( $ ) {

// 找到当前位置
$('a.scroll-link').click(function(e){
e.preventDefault();

$.scrollTo( $(this).attr("href"), {
duration: 1000,
easing:'swing'
});

});

} )( jQuery );

posted @ 2016-03-30 13:38  biyayue  阅读(262)  评论(0编辑  收藏  举报