-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.js
38 lines (27 loc) · 1.06 KB
/
app.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
function reply_click(btnId, clicked_id) {
const btns = document.querySelectorAll('.select-stars');
btns.forEach((btn) => {
if (btn == btnId) { btn.classList.add("active"); }
else { btn.classList.remove("active"); }
});
let selected = clicked_id;
document.getElementById("selectedRating").innerHTML = selected;
toggleButton(btnId);
}
function toggleButton(value) {
let element = document.getElementById(value);
element.classList.toggle("active");
}
document.getElementById("submit-button").onclick = function () {
document.getElementById("main-card").style.display = "none";
document.getElementById("state-start").style.display = "unset";
}
document.getElementById("close_thank_you").onclick = function () {
document.getElementById("state-start").style.display = "none";
document.getElementById("main-card").style.display = "unset";
const btns = document.querySelectorAll('.select-stars');
btns.forEach((btn) => {
btn.classList.remove("active");
});
// alert("I hear you");
}