-
Notifications
You must be signed in to change notification settings - Fork 0
/
script.js
44 lines (35 loc) · 934 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
32
33
34
35
36
37
38
39
40
41
42
43
44
console.log("page loaded...");
var profile = document.querySelector('.card-body h1');
function editProfile() {
profile.innerText = 'Joseph Begin';
}
var firstPerson = document.querySelector('#card-list-item-1');
var secondPerson = document.querySelector('#card-list-item-2');
var requests = document.querySelector('#conReq');
counter1 = 2;
var totalCon = document.querySelector('#yourCon');
counter2 = 418;
function accept1() {
firstPerson.remove();
counter1 -- ;
requests.innerText = counter1;
counter2 ++;
totalCon.innerText = counter2;
};
function deny1() {
firstPerson.remove();
counter1 -- ;
requests.innerText = counter1;
};
function accept2() {
secondPerson.remove();
counter1 -- ;
requests.innerText = counter1;
counter2 ++;
totalCon.innerText = counter2;
};
function deny2() {
secondPerson.remove();
counter1 -- ;
requests.innerText = counter1;
};