开发者

How do I use JQuery to move the user's screen down to the bottom, in a very smooth way?

开发者 https://www.devze.com 2023-02-05 09:07 出处:网络
Suppose I have a long page of text. The user is browsing at the top. 开发者_开发问答 How can I move the user all the way to the bottom of the page, in a smooth way?.scrollto() is what you\'re looking

Suppose I have a long page of text. The user is browsing at the top.

开发者_开发问答

How can I move the user all the way to the bottom of the page, in a smooth way?


.scrollto() is what you're looking for.

Here's an example of exactly what you want to accomplish.


Have you looked into scrollTo and animation?

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

This can be adapted to scroll to the bottom of the page.

0

精彩评论

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