From b29e121113a588d88b3d8f4265bece2c5e997cef Mon Sep 17 00:00:00 2001 From: Mario Date: Thu, 25 Feb 2021 12:55:19 +0000 Subject: replace sticky_kit with a simpler homwgrown solution (still a bit raw) and slightly change the way we load new content so that people with a long aside column do not have to scroll all the way to the bottom for loading the next page --- view/js/main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'view/js/main.js') diff --git a/view/js/main.js b/view/js/main.js index cd95a8a0b..0c48c8b18 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -1563,7 +1563,7 @@ function zFormError(elm,x) { $(window).scroll(function () { if(typeof buildCmd == 'function') { // This is a content page with items and/or conversations - if($(window).scrollTop() + $(window).height() > $(document).height() - 500) { + if($(window).scrollTop() + $(window).height() > $('#conversation-end').position().top) { if((pageHasMoreContent) && (! loadingPage)) { next_page++; scroll_next = true; @@ -1574,7 +1574,7 @@ $(window).scroll(function () { } else { // This is some other kind of page - perhaps a directory - if($(window).scrollTop() + $(window).height() > $(document).height() - 500) { + if($(window).scrollTop() + $(window).height() > $('#page-end').position().top) { if((pageHasMoreContent) && (! loadingPage) && (! justifiedGalleryActive)) { next_page++; scroll_next = true; -- cgit v1.2.3