activate last section heading when approaching footer (#21)
This commit is contained in:
parent
4d6f8a51e5
commit
12321ef691
|
@ -81,6 +81,11 @@ var $sitehead = $("#site-head");
|
||||||
}
|
}
|
||||||
|
|
||||||
$post.each(function () {
|
$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[item_index='" + (l) + "']").addClass("active")
|
||||||
|
} else {
|
||||||
var f = $(this).offset().top;
|
var f = $(this).offset().top;
|
||||||
var b = $(this).offset().top + $(this).height();
|
var b = $(this).offset().top + $(this).height();
|
||||||
var t = $(this).parent(".post-holder").index();
|
var t = $(this).parent(".post-holder").index();
|
||||||
|
@ -99,6 +104,7 @@ var $sitehead = $("#site-head");
|
||||||
i.removeClass("active");
|
i.removeClass("active");
|
||||||
a.fadeIn("slow");
|
a.fadeIn("slow");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue