-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathjavascript.js
80 lines (42 loc) · 1.78 KB
/
javascript.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
// profile picture upload
const imgDiv=document.querySelector('.user-img');
const img=document.querySelector("#photo");
const file=document.querySelector("#file");
file.addEventListener('change',function(){
const chosedFile=this.files[0];
if(chosedFile){
const reader=new FileReader();
reader.addEventListener("load",function(){
img.setAttribute("src",reader.result);
})
reader.readAsDataURL(chosedFile);
}
})
// popup for title
document.querySelector("#editTitle").addEventListener("click",function(){
document.querySelector(".popupTitle").classList.add("active");
});
document.querySelector(".popupTitle .close-btn").addEventListener("click",function(){
document.querySelector(".popupTitle").classList.remove("active");
});
//popup for hourly rate
document.querySelector("#rate").addEventListener("click",function(){
document.querySelector(".popupRate").classList.add("active");
});
document.querySelector(".popupRate .close-btn").addEventListener("click",function(){
document.querySelector(".popupRate").classList.remove("active");
});
//popup for projects
document.querySelector("#project").addEventListener("click",function(){
document.querySelector(".popupProject").classList.add("active");
});
document.querySelector(".popupProject .close-btn").addEventListener("click",function(){
document.querySelector(".popupProject").classList.remove("active");
});
//popup for experiences
document.querySelector("#experiences").addEventListener("click",function(){
document.querySelector(".popupExperiences").classList.add("active");
});
document.querySelector(".popupExperiences .close-btn").addEventListener("click",function(){
document.querySelector(".popupExperiences").classList.remove("active");
});