-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmaps.js
More file actions
23 lines (20 loc) · 740 Bytes
/
maps.js
File metadata and controls
23 lines (20 loc) · 740 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// Start Maps
document.addEventListener('DOMContentLoaded', () => {
const waveFilter = document.getElementById('filter-wave');
const hydroFilter = document.getElementById('filter-hydro');
const icons = document.querySelectorAll('.icon');
waveFilter.addEventListener('change', () => {
icons.forEach(icon => {
if (icon.dataset.type === 'wave') {
icon.style.display = waveFilter.checked ? 'block' : 'none';
}
});
});
hydroFilter.addEventListener('change', () => {
icons.forEach(icon => {
if (icon.dataset.type === 'hydro') {
icon.style.display = hydroFilter.checked ? 'block' : 'none';
}
});
});
});