Back to top

$(function () {
    $(window).scroll(function(){
        if ($(window).scrollTop()>600){
            $("#rocket_back_to_top").fadeIn(500);
        }else{
            $("#rocket_back_to_top").fadeOut(500);
        }
    });
    $("#rocket_back_to_top").click(function(){
        $('body,html').animate({scrollTop:0},500);
    });
});

猜你喜欢

转载自blog.csdn.net/carrey_0612/article/details/89087898
top
今日推荐