|
Tags: Blanking Manual revert |
Line 1: |
Line 1: |
| document.addEventListener("DOMContentLoaded", function() {
| |
| // Get all toggle headers (sections)
| |
| const toggleHeaders = document.querySelectorAll('.toggle-header');
| |
|
| |
|
| toggleHeaders.forEach(function(header) {
| |
| // Add click event listener to each header
| |
| header.addEventListener('click', function() {
| |
| // Find the content to toggle (it's the next sibling)
| |
| const content = header.nextElementSibling;
| |
|
| |
| // Toggle the visibility of the content
| |
| if (content && content.classList.contains('toggle-content')) {
| |
| content.style.display = (content.style.display === 'none' || content.style.display === '') ? 'block' : 'none';
| |
| }
| |
| });
| |
| });
| |
| });
| |