Difference between revisions of "Template:BNU-CHINA/article"

Line 51: Line 51:
 
             });
 
             });
 
         }
 
         }
 +
 +
        var currentIdx = 0;
 +
        $("article h2").each(function (index, item) {
 +
            if($(window).scrollTop() > $(item).offset.top) {
 +
                currentIdx = index;
 +
            }
 +
        });
 +
 +
        $("ul.sub-nav a")[currentIdx].css({
 +
            "color": "#000"
 +
        });
 
     });
 
     });
 
});
 
});

Revision as of 20:28, 17 September 2015