diff options
author | Sergio Delgado Quintero <sdelquin@gmail.com> | 2021-03-19 05:36:09 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-19 05:36:09 +0300 |
commit | 38143eda3233eb6755ca0a7df8642c1b78c81973 (patch) | |
tree | 90232c08775a3c57ac69b791a7a2ca0b5ce8f903 | |
parent | 12321ef6918c2f5b0567756b9026594308c7fd0f (diff) |
Adjust margin when activating sections (#19)
-rw-r--r-- | static/js/index.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/static/js/index.js b/static/js/index.js index fe53c5d..24c34c5 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"); |