How to scroll the window using JQuery $.scrollTo() function

$('html, body').animate({scrollTop: $("#page").offset().top}, 2000);

http://stackoverflow.com/questions/832860/

 

//鼠标滚动时, 阻止页面滚动方法
$(document).on('mousewheel DOMMouseScroll', function(){
    $('html, body').stop(true);
});

  

posted @ 2016-04-13 17:14  roseforyou  阅读(133)  评论(0编辑  收藏  举报