From 13693530a927b80a628eae8a26b3ee64eca20012 Mon Sep 17 00:00:00 2001 From: webmanager Date: Sat, 7 Nov 2026 17:29:30 +0000 Subject: [PATCH] =?UTF-8?q?FAQ:=20acorde=C3=B3n=20(al=20abrir=20una=20resp?= =?UTF-8?q?uesta=20se=20cierra=20la=20anterior)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- faq/index.html | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/faq/index.html b/faq/index.html index 168b827..215ee38 100644 --- a/faq/index.html +++ b/faq/index.html @@ -237,6 +237,13 @@ if (langBox) { applyLang(); }); } +// Accordion: only one answer open at a time +el('list').addEventListener('toggle', (ev) => { + const d = ev.target; + if (!d || d.tagName !== 'DETAILS' || !d.open) return; + el('list').querySelectorAll('details[open]').forEach(o => { if (o !== d) o.open = false; }); +}, true); + el('q').addEventListener('input', render); applyLang();