-
Notifications
You must be signed in to change notification settings - Fork 0
/
feedback.html
102 lines (82 loc) · 3.36 KB
/
feedback.html
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="feedback.css">
<script src="https://kit.fontawesome.com/5e552cd3b7.js" crossorigin="anonymous"></script>
<title>Feedback</title>
</head>
<body>
<div class="container">
<div class="feedbackbox">
<div class="emoji">
<div id="emoji">
<img src="emoji\poor.png">
<img src="emoji\bad.png">
<img src="emoji\okay.png">
<img src="emoji\good.png">
<img src="emoji\excellent.png">
</div>
</div>
<div class="rating">
<i class="fa-solid fa-star"></i>
<i class="fa-solid fa-star"></i>
<i class="fa-solid fa-star"></i>
<i class="fa-solid fa-star"></i>
<i class="fa-solid fa-star"></i>
</div>
</div>
</div>
<script>
var stars = document.getElementsByClassName("fa-solid");
var emoji = document.getElementById("emoji");
stars[0].onclick = function(){
stars[0].style.color = "#ffd93b";
stars[1].style.color = "#e4e4e4";
stars[2].style.color = "#e4e4e4";
stars[3].style.color = "#e4e4e4";
stars[4].style.color = "#e4e4e4";
emoji.style.transform = "translateX(0)";
alert("Thanks for Feedback");
}
stars[1].onclick = function(){
stars[0].style.color = "#ffd93b";
stars[1].style.color = "#ffd93b";
stars[2].style.color = "#e4e4e4";
stars[3].style.color = "#e4e4e4";
stars[4].style.color = "#e4e4e4";
emoji.style.transform = "translateX(-100px)";
alert("Thanks for Feedback");
}
stars[2].onclick = function(){
stars[0].style.color = "#ffd93b";
stars[1].style.color = "#ffd93b";
stars[2].style.color = "#ffd93b";
stars[3].style.color = "#e4e4e4";
stars[4].style.color = "#e4e4e4";
emoji.style.transform = "translateX(-200px)";
alert("Thanks for Feedback");
}
stars[3].onclick = function(){
stars[0].style.color = "#ffd93b";
stars[1].style.color = "#ffd93b";
stars[2].style.color = "#ffd93b";
stars[3].style.color = "#ffd93b";
stars[4].style.color = "#e4e4e4";
emoji.style.transform = "translateX(-300px)";
alert("Thanks for Feedback");
}
stars[4].onclick = function(){
stars[0].style.color = "#ffd93b";
stars[1].style.color = "#ffd93b";
stars[2].style.color = "#ffd93b";
stars[3].style.color = "#ffd93b";
stars[4].style.color = "#ffd93b";
emoji.style.transform = "translateX(-400px)";
alert("Thanks for Feedback");
}
</script>
</body>
</html>