From 6978f90fe1957deb2e3f9fceb93214e9d697d882 Mon Sep 17 00:00:00 2001 From: Sergio Delgado Quintero Date: Wed, 23 Dec 2020 21:15:49 +0000 Subject: [PATCH] Adjust margin when activating sections --- static/js/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/js/index.js b/static/js/index.js index 2558e3b..79a6a42 100644 --- a/static/js/index.js +++ b/static/js/index.js @@ -74,7 +74,7 @@ var $sitehead = $("#site-head"); var g = $sitehead.offset().top; var h = $sitehead.offset().top + $sitehead.height() - 100; - if (w >= g && w <= h) { + if (w >= Math.floor(g) && w <= Math.ceil(h)) { $(".fixed-nav").fadeOut("fast"); } else if ($(window).width() > 500) { $(".fixed-nav").fadeIn("fast");