-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.js
44 lines (42 loc) · 1.46 KB
/
main.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
let first = document.querySelector(".specifica");
let second = document.querySelector(".specificb");
let third = document.querySelector(".specificc");
let fourth = document.querySelector(".specificd");
let btn = document.querySelector("#btn1");
let bn = document.querySelector("#btn2");
first.addEventListener("click", () => {
first.style.borderBottom = "3px solid blanchedalmond";
second.style.borderBottom = "";
third.style.borderBottom = "";
fourth.style.borderBottom = "";
});
second.addEventListener("click", () => {
second.style.borderBottom = "3px solid blanchedalmond";
first.style.borderBottom = "";
third.style.borderBottom = "";
fourth.style.borderBottom ="";
});
third.addEventListener("click", () => {
third.style.borderBottom = "3px solid blanchedalmond";
fourth.style.borderBottom = "";
first.style.borderBottom = "";
second.style.borderBottom = "";
});
fourth.addEventListener("click", () => {
fourth.style.borderBottom = "3px solid transparent";
third.style.borderBottom ="";
first.style.borderBottom = "";
second.style.borderBottom = "";
});
btn.addEventListener("click", () => {
second.style.borderBottom = "3px solid blanchedalmond";
first.style.borderBottom = "";
third.style.borderBottom = "";
fourth.style.borderBottom ="";
});
bn.addEventListener("click", () => {
third.style.borderBottom = "3px solid blanchedalmond";
fourth.style.borderBottom = "";
first.style.borderBottom = "";
second.style.borderBottom = "";
});