changed document.body.offsetHeight to .height()

v1.18.x
Baris Soner Usakli 12 years ago
parent ac56f3a30a
commit 3f793ae902

@ -214,7 +214,7 @@
$('#load-more-users-btn').on('click', loadMoreUsers); $('#load-more-users-btn').on('click', loadMoreUsers);
$(window).off('scroll').on('scroll', function() { $(window).off('scroll').on('scroll', function() {
var bottom = (document.body.offsetHeight - $(window).height()) * 0.9; var bottom = ($(document).height() - $(window).height()) * 0.9;
if ($(window).scrollTop() > bottom && !loadingMoreUsers) { if ($(window).scrollTop() > bottom && !loadingMoreUsers) {
loadMoreUsers(); loadMoreUsers();

@ -123,7 +123,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).height() - $(window).height()) * 0.9;
if ($(window).scrollTop() > bottom && !loadingMoreTopics) { if ($(window).scrollTop() > bottom && !loadingMoreTopics) {
loadMoreTopics(cid); loadMoreTopics(cid);

@ -69,7 +69,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).height() - $(window).height()) * 0.9;
if ($(window).scrollTop() > bottom && !loadingMoreTopics) { if ($(window).scrollTop() > bottom && !loadingMoreTopics) {
loadMoreTopics(); loadMoreTopics();

@ -204,7 +204,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).height() - $(window).height()) * 0.9;
if ($(window).scrollTop() > bottom && !app.infiniteLoaderActive && $('#post-container').children().length) { if ($(window).scrollTop() > bottom && !app.infiniteLoaderActive && $('#post-container').children().length) {
app.loadMorePosts(tid); app.loadMorePosts(tid);

@ -91,7 +91,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).height() - $(window).height()) * 0.9;
if ($(window).scrollTop() > bottom && !loadingMoreTopics) { if ($(window).scrollTop() > bottom && !loadingMoreTopics) {
loadMoreTopics(); loadMoreTopics();

@ -105,7 +105,7 @@
$('#load-more-users-btn').on('click', loadMoreUsers); $('#load-more-users-btn').on('click', loadMoreUsers);
$(window).off('scroll').on('scroll', function() { $(window).off('scroll').on('scroll', function() {
var bottom = (document.body.offsetHeight - $(window).height()) * 0.9; var bottom = ($(document).height() - $(window).height()) * 0.9;
if ($(window).scrollTop() > bottom && !loadingMoreUsers) { if ($(window).scrollTop() > bottom && !loadingMoreUsers) {
loadMoreUsers(); loadMoreUsers();

Loading…
Cancel
Save