6 changed files with 15 additions and 1 deletions
|
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 1.0 MiB |
@ -0,0 +1,13 @@ |
|||||||
|
document.addEventListener('DOMContentLoaded', function() { |
||||||
|
const toggleButton = document.getElementById('toggle-facets'); |
||||||
|
const facets = document.querySelectorAll('.region--sidebar .block'); // Scope to sidebar
|
||||||
|
|
||||||
|
toggleButton.addEventListener('click', function() { |
||||||
|
const isHidden = facets[0].style.display === 'none' || !facets[0].style.display; // Assume initial 'none' from CSS
|
||||||
|
const newDisplay = isHidden ? 'block' : 'none'; |
||||||
|
|
||||||
|
facets.forEach(facet => { |
||||||
|
facet.style.display = newDisplay; |
||||||
|
}); |
||||||
|
}); |
||||||
|
}); |
||||||
Loading…
Reference in new issue