1:window
//滚动条事件
$(window).scroll(function () {
if ($("#rightTaskInfo").length <= 0 && $("#selectAllBox").length > 0) {
taskCenter.SelectAllOpPosition();
}
if ($("#createNewFolder").length <= 0) {
if (taskIndex.Settings.IsLoading == false) {
if (taskIndex.Settings.IsHave) {
if ($(document).scrollTop() + $(window).height() + 180 >= $(document).height()) {
$("#folderLoading").show();
taskIndex.Settings.pageIndex++;
taskIndex.LoadWaterfallFlowData();
}
} else {
$("#folderLoading").removeClass("loadingFirst").hide();
}
}
}
})
2:div
$("#folderNavigator .listContent").on("scroll", function () {
//没有更多了
if (!OtherPersonTasks.Settings.isMore || OtherPersonTasks.Settings.isLoading) {
return;
}
if (this.scrollTop + this.offsetHeight + 15 >= this.scrollHeight) {
OtherPersonTasks.Settings.pageIndex++;
OtherPersonTasks.loadSubordinateUsers();
}
});
原文:http://www.cnblogs.com/zhongping/p/4971199.html