-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnavigation.js
More file actions
31 lines (28 loc) · 1.19 KB
/
navigation.js
File metadata and controls
31 lines (28 loc) · 1.19 KB
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
const hamburger = document.getElementById("hamburger");
const menu = document.getElementById("menu");
const overlay = document.getElementById("overlay");
hamburger.addEventListener("click", function() {
menu.hidden = !menu.hidden
overlay.hidden = ! overlay.hidden
})
function addList(button, source) {
button.addEventListener("click", function() {
let dataFile = document.createElement("script")
dataFile.setAttribute("src", source)
dataFile.onload = function() {
getQuestion()
hamburger.click()
progressBar.style.borderColor = "rgb(41, 41, 41)"
points = 0
}
document.getElementsByTagName("head")[0].appendChild(dataFile)
})
}
addList(document.getElementById("apollinaire"), "data_apollinaire.js")
addList(document.getElementById("H234"), "data_H234.js")
// addList(document.getElementById("H1C1"), "data_H1C1.js")
// addList(document.getElementById("H1C2"), "data_H1C2.js")
// addList(document.getElementById("H2C1"), "data_H2C1.js")
// addList(document.getElementById("H2C2"), "data_H2C2.js")
// addList(document.getElementById("H2C3"), "data_H2C3.js")
// addList(document.getElementById("H3C1"), "data_H3C1.js")