-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
30 lines (26 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
//document object model
//on experimenting 1
const secondGrid = document.getElementById("content");
let changeTheme = document.getElementById("theme");
changeTheme.addEventListener("click",()=>{
if(secondGrid.style.backgroundColor==="black")
{
//here one imp logic exist that is if u keep azure in black in above u will see it....
secondGrid.style.backgroundColor="azure";
secondGrid.style.color="black";
}
else{
secondGrid.style.backgroundColor="black";
secondGrid.style.color="azure";
}
});
let wildCard = document.querySelector("*");
let changeFont = document.getElementById("font");
changeFont.addEventListener("click",()=>{
if(wildCard.style.fontSize!="23px")
{
wildCard.style.fontSize="23px";
}
else{
wildCard.style.fontSize="";
}});