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屋!
查看全文