Descripción


function toggleAccordion(header) { const content = header.nextElementSibling; const isOpen = content.style.maxHeight && content.style.maxHeight !== ‘0px’; // Cerrar todos los demás acordeones document.querySelectorAll(‘.accordion-body’).forEach(el => { el.style.maxHeight = ‘0px’; }); if (!isOpen) { content.style.maxHeight = content.scrollHeight + ‘px’; } }


















Valoraciones
Aún no hay reseñas