From 3f793ae902cd24c58794f53aa9011edd015e1b5c Mon Sep 17 00:00:00 2001 From: Baris Soner Usakli Date: Wed, 21 Aug 2013 14:33:05 -0400 Subject: [PATCH] changed document.body.offsetHeight to .height() --- public/src/forum/admin/users.js | 2 +- public/src/forum/category.js | 2 +- public/src/forum/recent.js | 2 +- public/src/forum/topic.js | 2 +- public/src/forum/unread.js | 2 +- public/src/forum/users.js | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/public/src/forum/admin/users.js b/public/src/forum/admin/users.js index 10967392a0..46a2f68b5f 100644 --- a/public/src/forum/admin/users.js +++ b/public/src/forum/admin/users.js @@ -214,7 +214,7 @@ $('#load-more-users-btn').on('click', loadMoreUsers); $(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) { loadMoreUsers(); diff --git a/public/src/forum/category.js b/public/src/forum/category.js index d36a445841..569d46958e 100644 --- a/public/src/forum/category.js +++ b/public/src/forum/category.js @@ -123,7 +123,7 @@ } $(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) { loadMoreTopics(cid); diff --git a/public/src/forum/recent.js b/public/src/forum/recent.js index 90c10f2dae..1cf2c25e98 100644 --- a/public/src/forum/recent.js +++ b/public/src/forum/recent.js @@ -69,7 +69,7 @@ } $(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) { loadMoreTopics(); diff --git a/public/src/forum/topic.js b/public/src/forum/topic.js index 5bd5a233c5..41f6f4d7ad 100644 --- a/public/src/forum/topic.js +++ b/public/src/forum/topic.js @@ -204,7 +204,7 @@ } $(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) { app.loadMorePosts(tid); diff --git a/public/src/forum/unread.js b/public/src/forum/unread.js index 14ad342ff1..e3c3a19138 100644 --- a/public/src/forum/unread.js +++ b/public/src/forum/unread.js @@ -91,7 +91,7 @@ } $(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) { loadMoreTopics(); diff --git a/public/src/forum/users.js b/public/src/forum/users.js index 411188f129..0cba6d649b 100644 --- a/public/src/forum/users.js +++ b/public/src/forum/users.js @@ -105,7 +105,7 @@ $('#load-more-users-btn').on('click', loadMoreUsers); $(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) { loadMoreUsers();