Javascript 向下滚动到页脚
任何人都知道如何在使用jquery单击指定的Javascript 向下滚动到页脚,javascript,jquery,Javascript,Jquery,任何人都知道如何在使用jquery单击指定的div时自动向下滚动到页脚部分吗?您可以通过为页脚部分提供id来完成此操作,请检查。这应该可以做到 $('#clickableItem').bind('click', function () { // get the distence left and top from the document left and top sides var _offset = $('#footer').offset(); $(window).scroll
div
时自动向下滚动到页脚部分吗?您可以通过为页脚部分提供id来完成此操作,请检查。这应该可以做到
$('#clickableItem').bind('click', function () {
// get the distence left and top from the document left and top sides
var _offset = $('#footer').offset();
$(window).scrollTop(_offset.top);
};
$(“body”).height()将计算窗的高度
如果您将高度值指定给html/body的scrollTop属性,那么工作就完成了
$('html, body').scrollTop($("body").height());
实际上,你应该在询问之前做更多的研究;)下面是您正在查找的内容的示例$(窗口)代码>99999或高值