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

Line 505: Line 505:
 
console.log(borders);
 
console.log(borders);
 
         for (var i = 0; i < subtitles.length; i++) {
 
         for (var i = 0; i < subtitles.length; i++) {
         if (window.pageYOffset >=borders[i] && window.pageYOffset <=borders[i+1]) {
+
         if ((window.pageYOffset >=borders[i])&& (window.pageYOffset <=borders[i+1])) {
 
         sidebar[i].style.display = "inline-block";
 
         sidebar[i].style.display = "inline-block";
 
         }
 
         }

Revision as of 04:46, 12 July 2018