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:
commit
97011f7cdf
1 changed files with 1 additions and 1 deletions
|
|
@ -73,7 +73,7 @@ var $sitehead = $("#site-head");
|
||||||
$post.each(function () {
|
$post.each(function () {
|
||||||
if (($(window).height() + w) > ($(document).height() - $(".site-footer").height())) {
|
if (($(window).height() + w) > ($(document).height() - $(".site-footer").height())) {
|
||||||
var l = $postholder.length;
|
var l = $postholder.length;
|
||||||
$(".fn-item[item_index='" + (l - 1) + "']").removeClass("active")
|
$(".fn-item").removeClass("active")
|
||||||
$(".fn-item[item_index='" + (l) + "']").addClass("active")
|
$(".fn-item[item_index='" + (l) + "']").addClass("active")
|
||||||
} else {
|
} else {
|
||||||
var f = $(this).offset().top;
|
var f = $(this).offset().top;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue