jQuery 滚动到页面/iframe 的底部 [英] jQuery Scroll to bottom of page/iframe
本文介绍了jQuery 滚动到页面/iframe 的底部的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何使用 jquery 向右滚动到 iframe 或页面的底部?
How do I use jquery to scroll right down to the bottom of an iframe or page?
推荐答案
如果你想要一个漂亮的慢速动画滚动,对于任何带有 href="#bottom"
的锚点,这会让你滚动到底部:
If you want a nice slow animation scroll, for any anchor with href="#bottom"
this will scroll you to the bottom:
$("a[href='#bottom']").click(function() {
$("html, body").animate({ scrollTop: $(document).height() }, "slow");
return false;
});
随意更改选择器.
这篇关于jQuery 滚动到页面/iframe 的底部的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文