开发者

jQuery slide to the bottom of page

开发者 https://www.devze.com 2023-02-20 16:24 出处:网络
Is there a way, using jQuery, I 开发者_StackOverflow中文版can slide to the bottom of the page I am currently on? Thanks.You may checkout the following article:

Is there a way, using jQuery, I 开发者_StackOverflow中文版can slide to the bottom of the page I am currently on? Thanks.


You may checkout the following article:

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


you may use this code.

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


You can do this:

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

If you wanted it on click:

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

See demo 1 and demo 2

0

精彩评论

暂无评论...
验证码 换一张
取 消