HANSONGTSENG (Talk | contribs) |
HANSONGTSENG (Talk | contribs) |
||
Line 494: | Line 494: | ||
var borders = [0]; | var borders = [0]; | ||
for (var i = 0; i <= subtitles.length - 1; i++) { | for (var i = 0; i <= subtitles.length - 1; i++) { | ||
− | borders.push(subtitles[i].scrollHeight+borders[i] | + | borders.push(subtitles[i].scrollHeight+borders[i]); |
} | } | ||
borders.shift(); | borders.shift(); | ||
Line 503: | Line 503: | ||
if (window.pageYOffset >=borders[i]){ | if (window.pageYOffset >=borders[i]){ | ||
if(window.pageYOffset <=borders[i+1]) { | if(window.pageYOffset <=borders[i+1]) { | ||
− | sidebar[i].style.display = " | + | sidebar[i].style.display = "block"; |
} | } | ||
else{ | else{ | ||
Line 516: | Line 516: | ||
$(".sidebar-item").mouseenter(function(){ | $(".sidebar-item").mouseenter(function(){ | ||
− | this.lastChild.style.display = " | + | this.lastChild.style.display = "block"; |
}); | }); | ||
$(".sidebar-item").mouseleave(function(){ | $(".sidebar-item").mouseleave(function(){ |
Revision as of 07:58, 12 July 2018