-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.js
More file actions
15 lines (14 loc) · 992 Bytes
/
Copy pathmain.js
File metadata and controls
15 lines (14 loc) · 992 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
function switchOff(){
document.getElementById("bulbImage").src = "https://d2clawv67efefq.cloudfront.net/ccbp-dynamic-webapps/bulb-go-off-img.png";
document.getElementById("catImage").src = "https://d2clawv67efefq.cloudfront.net/ccbp-dynamic-webapps/cat-eyes-img.png";
document.getElementById("switchStatus").textContent = "Switch Off";
document.getElementById("onSwitch").style.backgroundColor = "#22c55e";
document.getElementById("offSwitch").style.backgroundColor = "#cbd2d9";
}
function switchOn(){
document.getElementById("bulbImage").src = "https://d2clawv67efefq.cloudfront.net/ccbp-dynamic-webapps/bulb-go-on-img.png";
document.getElementById("catImage").src = "https://d2clawv67efefq.cloudfront.net/ccbp-dynamic-webapps/cat-img.png";
document.getElementById("switchStatus").textContent = "Switch On";
document.getElementById("onSwitch").style.backgroundColor = "cbd2d9";
document.getElementById("offSwitch").style.backgroundColor = "e12d39";
}