forked from shamilkeheliya/Hacktoberfest-22
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
41 lines (28 loc) · 921 Bytes
/
index.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
const summerSeason = document.getElementById("summer")
const winterSeason = document.getElementById("winter")
const autumnSeason = document.getElementById("autumn")
const springSeason = document.getElementById("spring")
//Summer
const summer = () => {
document.body.style.backgroundColor = "#EE9B01"
document.body.style.color = "#C8D2D1"
}
summerSeason.addEventListener("click", summer)
//Winter
const winter = () => {
document.body.style.backgroundColor = "#1f4b8e"
document.body.style.color = "#f1ece6"
}
winterSeason.addEventListener("click", winter)
//Autumn
const autumn = () => {
document.body.style.backgroundColor = "#283618"
document.body.style.color = "#606c38"
}
autumnSeason.addEventListener("click", autumn)
//Spring
const spring = () => {
document.body.style.backgroundColor = "#00b5a1"
document.body.style.color = "#fe98ab"
}
springSeason.addEventListener("click", spring)