-
Notifications
You must be signed in to change notification settings - Fork 0
/
script.js
79 lines (51 loc) · 1.56 KB
/
script.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
let istatus = document.querySelector(".dcrp")
var remove = document.querySelector(".remove")
var addFirend = document.querySelector(".add")
var flag = 0
addFirend.addEventListener("click",function()
{
if(flag == 0) {
setTimeout(() => {
istatus.style.color = "black "
istatus.innerHTML = "Friends"
addFirend.innerHTML = " Cencel Request"
}, 450);
flag = 1
} else {
setTimeout(() => {
addFirend.innerHTML = "Add Friend"
addFirend.innerHTML = "cencel"
istatus.innerHTML = "Request Cenceled"
}, 450);
flag = 0
}
})
// let istatus = document.querySelector(".dcrp")
// var addFirend = document.querySelector(".add")
// addFirend.addEventListener("click",function()
// {
// istatus.style.color = "black "
// istatus.innerHTML = "Friends"
// addFirend.innerHTML = "Friends"
// })
// var remove = document.querySelector(".remove")
// remove.addEventListener("click", function() {
// remove.innerHTML = "cencel"
// istatus.innerHTML = "Cencel Request"
// remove.style.backgroudColor = "aqua"
// })
//// profile-page 2
var istatus2 = document.querySelector(".decp")
var addFirend2 = document.querySelector(".add2")
addFirend2.addEventListener("click",function()
{
istatus2.style.color = "black "
istatus2.innerHTML = "Friends"
addFirend2.innerHTML = "Friends"
})
var remov = document.querySelector(".remove2")
remov.addEventListener("click", function() {
remov.innerHTML = "cencel"
istatus2.innerHTML = "Cencel Request"
remov.style.backgroudColor = "red"
})