-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscript7.js
45 lines (27 loc) · 1.02 KB
/
script7.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
function updatemenu() {
if (document.getElementById('responsive-menu').checked == true) {
document.getElementById('menu').style.borderBottomRightRadius = '0';
document.getElementById('menu').style.borderBottomLeftRadius = '0';
}else{
document.getElementById('menu').style.borderRadius = '10px';
}
}
function scrollFunction() {
var windowHeight = window.innerHeight;
for (var i = 1; i <= 43; i++) {
if (i == 8 || i == 34 || i == 35 || i == 36 || i == 37 || i == 38){
continue
}
var elementLink = document.getElementById("hiddenText" + i);
var elementPositionLink = elementLink.getBoundingClientRect().top;
if (elementPositionLink < windowHeight) {
elementLink.classList.add("visible" + i);
} else {
elementLink.classList.remove("visible" + i);
}
}
}
window.onscroll = function() {
scrollFunction();
};
scrollFunction();