jquery跳转到固定class位置

<script type="text/javascript">

$("#nav_down").click(function(){
//var h = $(document).height()-$(window).height();
//$(document).scrollTop(h);
$('html, body').animate({
scrollTop: $(".content").offset().top
}, 2000);
})

//跳到头部

$("#nav_down").click(

function() {
  $('html,body').animate({
    scrollTop: 0
  }, options._speed);
});

</script>

posted on 2017-06-22 14:56  醉半仙  阅读(333)  评论(0编辑  收藏  举报

导航