-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
45 lines (28 loc) 路 1.01 KB
/
Copy pathscript.js
File metadata and controls
45 lines (28 loc) 路 1.01 KB
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
40
41
42
43
44
45
const profilepic_div = document.querySelector('.profilepic_div')
const profilepic = document.querySelector('.profilepic')
const close_about_button = document.querySelector('.close_about_button')
const overlay_div = document.querySelector('.overlay_div')
const about_div = document.querySelector('.about_div')
const clickherechangingpart = document.querySelector('.clickherechangingpart')
const clickherespan = document.querySelector('.clickherespan')
let pic_no = 1
profilepic_div.addEventListener('click', (e) => {
if (pic_no==1){
pic_no = 2
clickherechangingpart.textContent = "again 馃槅"
}
else if (pic_no==2){
pic_no =3
clickherespan.textContent = ""
}
else if (pic_no==3){
pic_no = 1
}
profilepic.setAttribute('src', `media/me${pic_no}.png`)
about_div.showModal()
// overlay_div.style.display = "flex";
})
close_about_button.addEventListener('click', (e) => {
about_div.close()
// overlay_div.style.display = "none";
})