From ac56f3a30a43a03c920d7cb58624acbc63ceb74f Mon Sep 17 00:00:00 2001 From: Baris Soner Usakli Date: Wed, 21 Aug 2013 13:17:16 -0400 Subject: [PATCH] change document.body.scrollTop to .scrollTop() --- 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 088cf2fa43..10967392a0 100644 --- a/public/src/forum/admin/users.js +++ b/public/src/forum/admin/users.js @@ -216,7 +216,7 @@ $(window).off('scroll').on('scroll', function() { var bottom = (document.body.offsetHeight - $(window).height()) * 0.9; - if (document.body.scrollTop > bottom && !loadingMoreUsers) { + if ($(window).scrollTop() > bottom && !loadingMoreUsers) { loadMoreUsers(); } }); diff --git a/public/src/forum/category.js b/public/src/forum/category.js index d638bbcebe..d36a445841 100644 --- a/public/src/forum/category.js +++ b/public/src/forum/category.js @@ -125,7 +125,7 @@ $(window).off('scroll').on('scroll', function(ev) { var bottom = (document.body.offsetHeight - $(window).height()) * 0.9; - if (document.body.scrollTop > bottom && !loadingMoreTopics) { + if ($(window).scrollTop() > bottom && !loadingMoreTopics) { loadMoreTopics(cid); } }); diff --git a/public/src/forum/recent.js b/public/src/forum/recent.js index 1a81ac54fd..90c10f2dae 100644 --- a/public/src/forum/recent.js +++ b/public/src/forum/recent.js @@ -71,7 +71,7 @@ $(window).off('scroll').on('scroll', function() { var bottom = (document.body.offsetHeight - $(window).height()) * 0.9; - if (document.body.scrollTop > bottom && !loadingMoreTopics) { + if ($(window).scrollTop() > bottom && !loadingMoreTopics) { loadMoreTopics(); } }); diff --git a/public/src/forum/topic.js b/public/src/forum/topic.js index 71a51bfc91..5bd5a233c5 100644 --- a/public/src/forum/topic.js +++ b/public/src/forum/topic.js @@ -206,7 +206,7 @@ $(window).off('scroll').on('scroll', function() { 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); } }); diff --git a/public/src/forum/unread.js b/public/src/forum/unread.js index 82819e5f7d..14ad342ff1 100644 --- a/public/src/forum/unread.js +++ b/public/src/forum/unread.js @@ -93,7 +93,7 @@ $(window).off('scroll').on('scroll', function() { var bottom = (document.body.offsetHeight - $(window).height()) * 0.9; - if (document.body.scrollTop > bottom && !loadingMoreTopics) { + if ($(window).scrollTop() > bottom && !loadingMoreTopics) { loadMoreTopics(); } }); diff --git a/public/src/forum/users.js b/public/src/forum/users.js index 8a6eae77cd..411188f129 100644 --- a/public/src/forum/users.js +++ b/public/src/forum/users.js @@ -107,7 +107,7 @@ $(window).off('scroll').on('scroll', function() { var bottom = (document.body.offsetHeight - $(window).height()) * 0.9; - if (document.body.scrollTop > bottom && !loadingMoreUsers) { + if ($(window).scrollTop() > bottom && !loadingMoreUsers) { loadMoreUsers(); } });