Skip to content

Schedule Event with CW

CONNECT WITH THE CW TEAM
Please provide me with more information.
Contact us: 914-831-0207
Or fill out the form below.

document.addEventListener("DOMContentLoaded", function() { // Get all accordion toggle elements var accordions = document.querySelectorAll('.accordion-toggle'); // Add click event listeners to each accordion toggle accordions.forEach(function(accordion) { accordion.addEventListener('click', function() { // Get the panel-collapse element directly following this accordion-toggle var panelCollapse = this.nextElementSibling; // Check if this panel-collapse is currently open var isOpen = panelCollapse.classList.contains('open'); // Remove 'open' class from all panel-collapses accordions.forEach(function(acc) { var collapse = acc.nextElementSibling; collapse.classList.remove('open'); }); // Toggle 'open' class only on the clicked panel-collapse if (!isOpen) { panelCollapse.classList.add('open'); } }); }); });