条件:
1
|
$(
"div"
)[0].scrollTop + $(
"div"
).height() == $(
"div"
)[0].scrollHeight
|
完整滚动事件:
1
2
3
4
5
6
7
8
9
10
11
|
var
nScrollHight = 0;
var
nScrollTop = 0;
var
nDivHight = $(
".div"
).height();
$(
".div"
).scroll(
function
() {
nScrollHight = $(
this
)[0].scrollHeight;
nScrollTop = $(
this
)[0].scrollTop;
if
(nScrollTop + nDivHight == nScrollHight) {
alert(
"滚动条到底部了"
);
};
});
|
本文转自 爱笑嘚蛋蛋 51CTO博客,原文链接:http://blog.51cto.com/dd118/1843981,如需转载请自行联系原作者