-
Notifications
You must be signed in to change notification settings - Fork 1
/
displayHandler.js
31 lines (27 loc) · 999 Bytes
/
displayHandler.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
let typeCheck = document.getElementById("types-window");
let distributorCheck = document.getElementById("manufacturerEl-window");
let itemCheck = document.getElementById("item-window");
let typeDiv = document.getElementsByClassName("types-window")[0];
let distributorDiv = document.getElementsByClassName("manufacturerEl-window")[0];
let itemDiv = document.getElementsByClassName("item-window")[0];
typeCheck.addEventListener('change', (event) => {
if (event.currentTarget.checked) {
typeDiv.style.display = "block";
} else {
typeDiv.style.display = "none";
}
})
distributorCheck.addEventListener('change', (event) => {
if (event.currentTarget.checked) {
distributorDiv.style.display = "block";
} else {
distributorDiv.style.display = "none";
}
})
itemCheck.addEventListener('change', (event) => {
if (event.currentTarget.checked) {
itemDiv.style.display = "block";
} else {
itemDiv.style.display = "none";
}
})