-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathextenint.js
More file actions
46 lines (24 loc) · 898 Bytes
/
extenint.js
File metadata and controls
46 lines (24 loc) · 898 Bytes
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
// Select ALL toggle buttons
const toggleButtons = document.querySelectorAll('.oval');
// Loop through each one and attach event
toggleButtons.forEach(button => {
button.addEventListener('click', () => {
button.classList.toggle('active');
});
});
const darkToggle = document.getElementById('darkModeToggle');
darkToggle.addEventListener('click', () => {
document.body.classList.toggle('dark-mode');
});
const filterButtons = document.querySelectorAll('.filter-bttn');
filterButtons.forEach(button => {
button.addEventListener('click', () => {
const filterType = button.id;
console.log(`You clicked: ${filterType}`);
// Optional: add an 'active' style
filterButtons.forEach(btn => btn.classList.remove('active'));
button.classList.add('active');
// You can now filter cards or content here based on filterType
});
});
cd57bbf (updated)