jQuery滑到页面底部

时间:2011-03-27 20:28:54

标签: jquery

有没有办法,使用jQuery,我可以滑到我目前在的页面底部?感谢。

3 个答案:

答案 0 :(得分:7)

您可以结帐following article

$('#scrlBotm').click(function () {
    $('html, body').animate({
        scrollTop: $(document).height()
    }, 1500);
    return false;
});

答案 1 :(得分:2)

您可以使用此代码。

$('html, body').animate({scrollTop: $("body").height()}, 800);

答案 2 :(得分:1)

你可以这样做:

$(document).scrollTop($(document).height());

如果你想点击它:

$('#btn').click(function() {
    $(document).scrollTop($(document).height());
});

请参阅demo 1demo 2