-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.js
More file actions
30 lines (22 loc) · 648 Bytes
/
app.js
File metadata and controls
30 lines (22 loc) · 648 Bytes
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
const toggleSwitch= document.querySelector('.switch')
const checkbox= document.querySelector('.checkbox')
const pgOne= document.getElementById('pg1')
const span= document.querySelector('#nxtpg')
toggleSwitch.addEventListener('change',function(){
if(checkbox.checked == true){
pgOne.style.backgroundColor= 'rgb(41, 51, 70)'
}else {
// dark()
pgOne.style.backgroundColor= 'black'
}
})
span.onmouseover =function(){
// span.style.fontSize= 48
span.style.color= 'grey'
}
span.onmouseout = function(){
span.style.color= 'white'
}
span.addEventListener('click',function(){
scroll(0,1000)
})