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

Line 54: Line 54:
 
         var currentIdx = 0;
 
         var currentIdx = 0;
 
         $("article h2").each(function (index, item) {
 
         $("article h2").each(function (index, item) {
             if($(window).scrollTop() > $(item).offset().top) {
+
             if($(window).scrollTop() > $(item).offset().top - baseline - $(".sub-header").height()) {
 
                 currentIdx = index;
 
                 currentIdx = index;
 
             }
 
             }

Revision as of 20:32, 17 September 2015