Difference between revisions of "Template:NYMU-Taipei/newtemplate1"

Line 496: Line 496:
 
var borders = [0];
 
var borders = [0];
 
     for (var i = 0; i <= subtitles.length - 1; i++) {
 
     for (var i = 0; i <= subtitles.length - 1; i++) {
console.log(subtitles[i]);
 
 
     borders.push(subtitles[i].scrollHeight+borders[i]-100);
 
     borders.push(subtitles[i].scrollHeight+borders[i]-100);
 
     }
 
     }
console.log(borders);  
+
console.log(borders);  
 +
console.log(sidebar); 
 
         for (var i = 0; i < subtitles.length; i++) {
 
         for (var i = 0; i < subtitles.length; i++) {
 
         if (window.pageYOffset >=borders[i]){
 
         if (window.pageYOffset >=borders[i]){

Revision as of 07:50, 12 July 2018