-
Notifications
You must be signed in to change notification settings - Fork 48
/
Copy pathindex.js
37 lines (24 loc) · 848 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
const summerSeason = document.getElementById("summer")
const winterSeason = document.getElementById("winter")
const autumnSeason = document.getElementById("autumn")
const springSeason = document.getElementById("spring")
//Summer
const summer = () => {
document.querySelector(".main").style.backgroundColor = "rgb(244 165 18 / 74%)"
}
summerSeason.addEventListener("click", summer)
//Winter
const winter = () => {
document.querySelector(".main").style.backgroundColor = "#FFC090"
}
winterSeason.addEventListener("click", winter)
//Autumn
const autumn = () => {
document.querySelector(".main").style.backgroundColor = "#922e4a"
}
autumnSeason.addEventListener("click", autumn)
//Spring
const spring = () => {
document.querySelector(".main").style.backgroundColor = "#A3C566"
}
springSeason.addEventListener("click", spring)