-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.js
More file actions
20 lines (20 loc) · 661 Bytes
/
app.js
File metadata and controls
20 lines (20 loc) · 661 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
function openAnswer(n){
var ans = document.getElementById("answer" + n);
var arrow = document.getElementById("arrow" + n);
if (ans.style.display === "block") {
ans.style.display = "none";
arrow.style.transform = "rotate(0)";
} else {
ans.style.display = "block";
arrow.style.transform = "rotate(180deg)";
for (i=1; i<6;i++){
if (i==n){
continue;
}
var j = document.getElementById("answer" + i);
var l = document.getElementById("arrow" + i);
j.style.display = "none";
l.style.transform = "rotate(0)";
}
}
}