相关疑难解决方法(0)

Jquery发现div是否在滚动时到达底部

我不能得到这个工作,有什么问题?

$("#scrollingbox").scroll(function() { //detect page scroll

    if($("#scrollingbox").scrollTop() + $("#scrollingbox").height() == $("#scrollingbox").height())  //user scrolled to bottom of the page?
    {
            //do something
        }
 }
Run Code Online (Sandbox Code Playgroud)

发生的事情是我需要再次向上滚动才能检测到它到达底部.

html css php jquery content-management-system

2
推荐指数
1
解决办法
5273
查看次数

标签 统计

content-management-system ×1

css ×1

html ×1

jquery ×1

php ×1