-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscript.js
31 lines (28 loc) · 879 Bytes
/
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
var clicks = 0;
const followers = document.getElementById("followers");
const buttonf = document.getElementById("btnf");
buttonf.addEventListener("click", function () {
if (buttonf.innerText === "Follow") {
buttonf.innerText = "Unfollow";
clicks += 1;
followers.innerText = 80 + clicks + "K";
} else {
buttonf.innerText = "Follow";
clicks -= 1;
followers.innerText = 80 + clicks + "K";
}
});
const buttonl = document.getElementById("btnl");
const likes = document.getElementById("likes");
buttonl.addEventListener("click", function () {
if (buttonl.innerText === "Like") {
buttonl.innerText = "Unlike";
clicks += 1;
likes.innerText = 803 + clicks + "K";
} else {
buttonl.innerText = "Like";
clicks -= 1;
likes.innerText = 803 + clicks + "K";
}
});
document.querySelector("#loginbtn");