-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuttons.js
More file actions
45 lines (36 loc) · 1.41 KB
/
buttons.js
File metadata and controls
45 lines (36 loc) · 1.41 KB
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
const combineButton = document.querySelector('.combine');
const regionButton = document.querySelector('.region');
const globalButton = document.querySelector('.global');
combineButton.addEventListener('click', () => {
// active
combineButton.style.backgroundColor = '#5F5FAB'
combineButton.style.color = '#fafafa'
// inactive
regionButton.style.backgroundColor = 'rgb(235, 235, 235)'
regionButton.style.color = 'rgb(179, 179, 179)'
// inactive
globalButton.style.backgroundColor = 'rgb(235, 235, 235)'
globalButton.style.color = 'rgb(179, 179, 179)'
})
regionButton.addEventListener('click', () => {
// active
regionButton.style.backgroundColor = '#5F5FAB'
regionButton.style.color = '#fafafa'
// inactive
combineButton.style.backgroundColor = 'rgb(235, 235, 235)'
combineButton.style.color = 'rgb(179, 179, 179)'
// inactive
globalButton.style.backgroundColor = 'rgb(235, 235, 235)'
globalButton.style.color = 'rgb(179, 179, 179)'
})
globalButton.addEventListener('click', () => {
// active
globalButton.style.backgroundColor = '#5F5FAB'
globalButton.style.color = '#fafafa'
// inactive
combineButton.style.backgroundColor = 'rgb(235, 235, 235)'
combineButton.style.color = 'rgb(179, 179, 179)'
// inactive
regionButton.style.backgroundColor = 'rgb(235, 235, 235)'
regionButton.style.color = 'rgb(179, 179, 179)'
})