From af6a68b5aa77ce1833fdd188f5c06737fc14679b Mon Sep 17 00:00:00 2001 From: kushalv238 Date: Sun, 22 Oct 2023 19:52:52 +0530 Subject: [PATCH] fix: hidden show less button when user leaves the section --- js/script.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/script.js b/js/script.js index e95bdb0..59e48ad 100644 --- a/js/script.js +++ b/js/script.js @@ -348,8 +348,8 @@ if (/MSIE [5-9]/.test(navigator.userAgent)) { $(".buttonMore").css({ position: "absolute", bottom: -50 }); } else { var bottomScreen = scrollTop + $(window).height(); - - if (bottomScreen > $("#featuredOrg").offset().top + 25) { + + if ((bottomScreen > $("#featuredOrg").offset().top + 25) || (bottomScreen < $('#featuredProj').offset().top + 500)) { $(".buttonLess").css({ position: "absolute", bottom: -50 }); } else { $(".buttonLess").css({ position: "fixed", bottom: 0 });