Merge pull request #135 from zjedi/pr/fix-two-active-menu-links

Fix: Two menu items active when scrolled at the bottom
This commit is contained in:
zjedi 2023-04-04 22:15:23 +02:00 committed by GitHub
commit 97011f7cdf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -73,7 +73,7 @@ var $sitehead = $("#site-head");
$post.each(function () {
if (($(window).height() + w) > ($(document).height() - $(".site-footer").height())) {
var l = $postholder.length;
$(".fn-item[item_index='" + (l - 1) + "']").removeClass("active")
$(".fn-item").removeClass("active")
$(".fn-item[item_index='" + (l) + "']").addClass("active")
} else {
var f = $(this).offset().top;