-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscript.js
93 lines (80 loc) · 2.56 KB
/
script.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
window.addEventListener("scroll",function(){
var header = document.querySelector("header");
header.classList.toggle("header-js" ,window.scrollY > 100)
})
let modalBtns2 = [...document.querySelectorAll(".buttonTelecoms")];
modalBtns2.forEach(function (btn2) {
btn2.onclick = function () {
let modal = btn2.getAttribute("data-modal");
document.getElementById(modal).style.display = "block";
};
});
let closeBtns2 = [...document.querySelectorAll(".close")];
closeBtns2.forEach(function (btn2) {
btn2.onclick = function () {
let modal = btn2.closest(".modal");
modal.style.display = "none";
};
});
window.onclick = function (event2) {
if (event2.target.className === "modal") {
event2.target.style.display = "none";
}
};
let modalBtns = [...document.querySelectorAll(".buttonReseau")];
modalBtns.forEach(function (btn) {
btn.onclick = function () {
let modal = btn.getAttribute("data-modal");
document.getElementById(modal).style.display = "block";
};
});
let closeBtns = [...document.querySelectorAll(".close")];
closeBtns.forEach(function (btn) {
btn.onclick = function () {
let modal = btn.closest(".modal");
modal.style.display = "none";
};
});
window.onclick = function (event) {
if (event.target.className === "modal") {
event.target.style.display = "none";
}
};
let modalBtns3 = [...document.querySelectorAll(".buttonProg")];
modalBtns3.forEach(function (btn3) {
btn3.onclick = function () {
let modal = btn3.getAttribute("data-modal");
document.getElementById(modal).style.display = "block";
};
});
let closeBtns3 = [...document.querySelectorAll(".close")];
closeBtns3.forEach(function (btn3) {
btn3.onclick = function () {
let modal = btn3.closest(".modal");
modal.style.display = "none";
};
});
window.onclick = function (event3) {
if (event3.target.className === "modal") {
event3.target.style.display = "none";
}
};
let modalBtns4 = [...document.querySelectorAll(".buttonCyber")];
modalBtns4.forEach(function (btn4) {
btn4.onclick = function () {
let modal = btn4.getAttribute("data-modal");
document.getElementById(modal).style.display = "block";
};
});
let closeBtns4 = [...document.querySelectorAll(".close")];
closeBtns4.forEach(function (btn4) {
btn4.onclick = function () {
let modal = btn4.closest(".modal");
modal.style.display = "none";
};
});
window.onclick = function (event4) {
if (event4.target.className === "modal") {
event4.target.style.display = "none";
}
};