-
Notifications
You must be signed in to change notification settings - Fork 0
/
script.js
28 lines (28 loc) · 947 Bytes
/
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
function myFunction() {
var element = document.getElementById("Dropdown");
element.classList.toggle("invisible");
}
window.onclick = function (e) {
if (!e.target.matches(".dropBtn")) {
var myDropdown = document.getElementById("Dropdown");
if (!myDropdown.classList.contains("invisible")) {
myDropdown.classList.add("invisible");
}
var myDropdown = document.getElementById("dropdownTeacher");
if (!myDropdown.classList.contains("invisible")) {
myDropdown.classList.add("invisible");
}
}
};
function myFunctionTeacher() {
var element = document.getElementById("dropdownTeacher");
element.classList.toggle("invisible");
}
// window.onclick = function (e) {
// if (!e.target.matches(".dropBtnTeacher")) {
// var myDropdown = document.getElementById("dropdownTeacher");
// if (!myDropdown.classList.contains("invisible")) {
// myDropdown.classList.add("invisible");
// }
// }
// };