<script type="text/javascript">
//<![CDATA[
$(function() {
$(window).scroll(function() {
var threshold = $(window).height() / 4;
var active_section;
var active_section_top = -Infinity;
$(".scrolling-document-section").each(function(index, section) {
var section_top = $(section).offset().top - $(window).scrollTop();
if (section_top > active_section_top && section_top < threshold) {
active_section_top = section_top;
active_section = section;
}
});
if (active_section) {
$("#menu-explore-features a").removeClass("active");
$("#menu-explore-features a[href$='#" + $(active_section).attr("id") + "']").addClass("active");
}
});
$(window).scroll();
});
//]]>
</script>
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.