mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-06 22:15:48 +01:00
change document.body.scrollTop to .scrollTop()
This commit is contained in:
@@ -216,7 +216,7 @@
|
|||||||
$(window).off('scroll').on('scroll', function() {
|
$(window).off('scroll').on('scroll', function() {
|
||||||
var bottom = (document.body.offsetHeight - $(window).height()) * 0.9;
|
var bottom = (document.body.offsetHeight - $(window).height()) * 0.9;
|
||||||
|
|
||||||
if (document.body.scrollTop > bottom && !loadingMoreUsers) {
|
if ($(window).scrollTop() > bottom && !loadingMoreUsers) {
|
||||||
loadMoreUsers();
|
loadMoreUsers();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -125,7 +125,7 @@
|
|||||||
$(window).off('scroll').on('scroll', function(ev) {
|
$(window).off('scroll').on('scroll', function(ev) {
|
||||||
var bottom = (document.body.offsetHeight - $(window).height()) * 0.9;
|
var bottom = (document.body.offsetHeight - $(window).height()) * 0.9;
|
||||||
|
|
||||||
if (document.body.scrollTop > bottom && !loadingMoreTopics) {
|
if ($(window).scrollTop() > bottom && !loadingMoreTopics) {
|
||||||
loadMoreTopics(cid);
|
loadMoreTopics(cid);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -71,7 +71,7 @@
|
|||||||
$(window).off('scroll').on('scroll', function() {
|
$(window).off('scroll').on('scroll', function() {
|
||||||
var bottom = (document.body.offsetHeight - $(window).height()) * 0.9;
|
var bottom = (document.body.offsetHeight - $(window).height()) * 0.9;
|
||||||
|
|
||||||
if (document.body.scrollTop > bottom && !loadingMoreTopics) {
|
if ($(window).scrollTop() > bottom && !loadingMoreTopics) {
|
||||||
loadMoreTopics();
|
loadMoreTopics();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -206,7 +206,7 @@
|
|||||||
$(window).off('scroll').on('scroll', function() {
|
$(window).off('scroll').on('scroll', function() {
|
||||||
var bottom = (document.body.offsetHeight - $(window).height()) * 0.9;
|
var bottom = (document.body.offsetHeight - $(window).height()) * 0.9;
|
||||||
|
|
||||||
if ((document.documentElement.scrollTop || document.body.scrollTop) > bottom && !app.infiniteLoaderActive && $('#post-container').children().length) {
|
if ($(window).scrollTop() > bottom && !app.infiniteLoaderActive && $('#post-container').children().length) {
|
||||||
app.loadMorePosts(tid);
|
app.loadMorePosts(tid);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -93,7 +93,7 @@
|
|||||||
$(window).off('scroll').on('scroll', function() {
|
$(window).off('scroll').on('scroll', function() {
|
||||||
var bottom = (document.body.offsetHeight - $(window).height()) * 0.9;
|
var bottom = (document.body.offsetHeight - $(window).height()) * 0.9;
|
||||||
|
|
||||||
if (document.body.scrollTop > bottom && !loadingMoreTopics) {
|
if ($(window).scrollTop() > bottom && !loadingMoreTopics) {
|
||||||
loadMoreTopics();
|
loadMoreTopics();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -107,7 +107,7 @@
|
|||||||
$(window).off('scroll').on('scroll', function() {
|
$(window).off('scroll').on('scroll', function() {
|
||||||
var bottom = (document.body.offsetHeight - $(window).height()) * 0.9;
|
var bottom = (document.body.offsetHeight - $(window).height()) * 0.9;
|
||||||
|
|
||||||
if (document.body.scrollTop > bottom && !loadingMoreUsers) {
|
if ($(window).scrollTop() > bottom && !loadingMoreUsers) {
|
||||||
loadMoreUsers();
|
loadMoreUsers();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user