-
Notifications
You must be signed in to change notification settings - Fork 0
/
form.js
55 lines (41 loc) · 1.45 KB
/
form.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
let bloomIcon = document.getElementById("bloomicon");
let game = document.getElementById("main-windows-girlscout");
let ticTacIcon= document.getElementById("tictacicon");
let bloomTechForm= document.getElementById("bloom-tech-form");
let submitForm= document.getElementById("submitBtn");
let resultsDiv= document.getElementById("results-api");
const loader = document.querySelector("#loading");
// let clearResults = document.getElementById("resetBtn");
//show loading icon
// function displayLoading() {
// loader.classList.add("display");
// //stop loading results after time
// setTimeout(() => {
// loader.classList.remove("display");
// }, 10000);
// }
//hiding loading
function hideLoading() {
loader.classList.remove("display");
}
bloomicon.addEventListener("click", function () {
bloomTechForm.style.display= "block";
console.log("this worked");
game.style.visibility= "hidden";
});
ticTacIcon.addEventListener("click", function () {
console.log("this worked also!");
bloomTechForm.style.display= "none";
resultsDiv.style.display= "none";
// game.style.display = "block";
game.style.visibility= "visible";
})
submitForm.addEventListener("click", function () {
bloomTechForm.style.display= "none";
resetBtn.style.display= "block";
loader.classList.add("display");
// //stop loading results after time
setTimeout(() => {
loader.classList.remove("display");
}, 10000);
})