(function(){ // Run after DOM ready document.addEventListener('DOMContentLoaded', function() { // Helper: find the content controlled by a button function getContentForButton(btn) { const ctl = btn.getAttribute('aria-controls'); if (ctl) return document.getElementById(ctl); // fallback: look for sibling/menu-content return btn.closest('.e-n-menu-item')?.querySelector('.e-n-menu-content') || null; } // Close a single button/menu function closeButton(btn) { const content = getContentForButton(btn); if (content) content.style.display = 'none'; btn.setAttribute('aria-expanded', 'false'); btn.classList.remove('e-n-open'); btn.closest('.e-n-menu-item')?.classList.remove('e-n-open'); const opened = btn.querySelector('.e-n-menu-dropdown-icon-opened'); const closed = btn.querySelector('.e-n-menu-dropdown-icon-closed'); if (opened) opened.style.display = 'none'; if (closed) closed.style.display = ''; } // Open a single button/menu function openButton(btn) { const content = getContentForButton(btn); if (!content) return; // let CSS pick the display where possible; otherwise force block content.style.display = ''; if (getComputedStyle(content).display === 'none') content.style.display = 'block'; btn.setAttribute('aria-expanded', 'true'); btn.classList.add('e-n-open'); btn.closest('.e-n-menu-item')?.classList.add('e-n-open'); const opened = btn.querySelector('.e-n-menu-dropdown-icon-opened'); const closed = btn.querySelector('.e-n-menu-dropdown-icon-closed'); if (opened) opened.style.display = ''; if (closed) closed.style.display = 'none'; } // Close every menu except optional `exceptBtn` function closeAll(exceptBtn) { document.querySelectorAll('.e-n-menu-dropdown-icon[aria-expanded="true"], .e-n-menu-dropdown-icon.e-n-open') .forEach(btn => { if (btn === exceptBtn) return; closeButton(btn); }); } // Toggle function toggleButton(btn) { const isOpen = btn.getAttribute('aria-expanded') === 'true' || btn.classList.contains('e-n-open'); if (isOpen) closeButton(btn); else { closeAll(btn); openButton(btn); } } // Use event delegation so this works even if the menu is injected later document.addEventListener('click', function(e) { const btn = e.target.closest('.e-n-menu-dropdown-icon'); if (btn) { e.preventDefault(); e.stopPropagation(); // avoid immediate document click close toggleButton(btn); return; } // Click outside any menu item -> close all if (!e.target.closest('.e-n-menu-item')) { closeAll(); } }, true); // Also allow Escape to close menus document.addEventListener('keydown', function(e) { if (e.key === 'Escape') closeAll(); }); // Optional: handle touchstart to make mobile feel snappier document.addEventListener('touchstart', function(e) { const btn = e.target.closest('.e-n-menu-dropdown-icon'); if (btn) { e.stopPropagation(); toggleButton(btn); } else if (!e.target.closest('.e-n-menu-item')) { closeAll(); } }, {passive: true}); }); })(); .e-n-menu-item .e-n-menu-content { display: none; } /* optional visual class when open */ .e-n-menu-item.e-n-open > .e-n-menu-content { display: block; }

Why do we recover heat in ventilation systems?

Download PDF printable version of this post Today, mechanical ventilation systems are an indispensable element of building equipment, regardless of their purpose. They are used in practically all newly built facilities, as well as in older ones, which were built at a time when our needs for comfort resulting from air quality were not as […]

3Å molecular sieve… for pure moisture recovery

PDF printable version of this post Energy recovery wheels, which, despite the fact that they cannot be used in all ventilation systems, are generally considered to be the best of the commonly used heat recovery systems in air handling units. In any comparison, their performance outweighs other typical solutions (core heat exchangers, run-around coils, etc.). […]

Crossflow or Counterflow Heat Exchanger: Which Is Best?

An indirect heat recovery system based on the “recuperation” effect is a solution commonly met in various ventilation systems for decades. Depending on the climate region – recuperators may be used to support the Air Handling Unit in winter operations – or summer. But regardless of where it is applied – the goal is the […]

Transformation of the fan – from DDIW to EC

Perpetrual transformation Over the past 15 years, significant changes have been made to the design of fans used in the HVAC industry, in particular in air handling units. The solutions have undergone such changes that many people, seeing at the same time a fan used in an air handling unit until recently and an analogous […]

Digital transformation in HVAC Part 2 – The Swiss Rotors’ dll

Whenever we plan to use any technical product in our environment, we make the decision to purchase it based on the assessment of its features, which can usually be divided into two groups. The first are those that are easy to describe by parameters such as shape, size, weight, colour, etc. In other words, these […]

Principles of the radial backward-curved fan

Choosing the right fan is probably one of the most crucial moments in designing or configuring a ventilation device, regardless of its type or purpose. In the case of an air handling unit, the correct selection of this critical component will have a decisive impact on the overall efficiency of the ventilation system, the costs […]