【发布时间】:2013-09-12 15:30:04
【问题描述】:
当滚动到达页面的底部时,我想调用一个特定的函数。
这是我使用的代码 m,但它不适合我。没有控制台错误,但仍然无法正常工作。
$(function() {
var scrollEnded = $.debounce(500, false, function() {
console.log('scroll ended');
alert("ok"); // I will call my function here. Just need an alert.
});
});
【问题讨论】:
-
你不能检查
window.scroll,然后检查直到顶部的偏移量吗? -
这可能会有所帮助:: stackoverflow.com/questions/5609255/…
标签: jquery