Difference between revisions of "Template:SJTU-BioX-Shanghai/Alpha/Header"

Line 22: Line 22:
 
   var prev_a = $('#toc a.reading');
 
   var prev_a = $('#toc a.reading');
 
   var a = $('a[href="#'+ id +'"]');
 
   var a = $('a[href="#'+ id +'"]');
  console.log(prev_a[0], a[0]);
 
 
   prev_a.removeClass('reading');
 
   prev_a.removeClass('reading');
  prev_a.addClass('reading');
 
 
   a.addClass('reading');
 
   a.addClass('reading');
 
}
 
}
Line 40: Line 38:
 
   )
 
   )
  
   //setInterval("toc_loop()", 1000);
+
   setInterval("toc_loop()", 1000);
 
}
 
}
  
Line 69: Line 67:
 
   border-left-color: #109E52;
 
   border-left-color: #109E52;
 
}
 
}
#toc ul li.reading-section a {
+
#toc ul a.reading {
  border-left-color: #9E1052;
+
   border-left-color: red;
}
+
#toc ul li.reading-section ~ * a {
+
   border-left-color: #10529E;
+
 
}
 
}
  

Revision as of 09:08, 17 August 2015