I want to place an element to the bottom of the page whenever the user scrolls the page. It's like "fixed position" but I can't use "position: fixed" css as many of my clients' browser can't support that.

I noticed jquery can get current viewport's top position, but how can I get the bottom of the scroll viewport?

所以我在问如何知道:$(窗口).滚动底部()

推荐答案

var scrollBottom = $(window).scrollTop() + $(window).height();

Jquery相关问答推荐

使用jquery ui来回滑动切换

点击和touch 事件之间的jQuery冲突解决方法

从 React 到 Node 服务器的 ajax 调用中的数据未定义

$ 不是函数 - jQuery 错误

如何使用 jQuery 的 drop 事件上传从桌面拖动的文件?

jQuery 上传进度和 AJAX 文件上传

JavaScript 或 jQuery 字符串以实用函数结尾

jQuery 动画滚动

Ajax 更新后在 jQuery 中重新绑定事件(更新面板)

删除所有子元素的 CLASS

Backbone.js 和 jQuery

jquery-ui datepicker更改z-index

将 CSS 应用于 jQuery 对话框按钮

jQuery Force 为 iframe 设置 src 属性

DataTables:无法读取未定义的属性长度

jQuery $(".class").click(); - 多个元素,点击事件一次

如何在调用 Ajax 等异步调用时让代码等待

使用 jQuery 和 CSS 将数字转换为星级显示

更改 url 而不使用 javascript 重定向

使用 jQuery 将一个标签替换为另一个标签