1/** 2 * FAQ blok (custom/block-faq) â frontend 3 * Accordion (rozbalovánà + single-open) Åešà nativnà <details name="â¦">. 4 * Tady jen pÅepÃnánà tabů v režimu "tabs". 5 */ 6document.addEventListener('DOMContentLoaded', function () { 7 document.querySelectorAll('.wp-block-custom-faq .faq-display-tabs').forEach(function (block) { 8 var tabs = block.querySelectorAll('.faq-tabs .faq-tab'); 9 var panels = block.querySelectorAll('.faq-categories > .faq-category'); 10 if (!tabs.length) return; 11 12 tabs.forEach(function (tab) { 13 tab.addEventListener('click', function () { 14 var targetId = tab.getAttribute('data-faq-target'); 15 16 tabs.forEach(function (t) { 17 var active = t === tab; 18 t.classList.toggle('is-active', active); 19 t.setAttribute('aria-selected', active ? 'true' : 'false'); 20 }); 21 22 panels.forEach(function (panel) { 23 panel.classList.toggle('faq-hidden', panel.id !== targetId); 24 }); 25 }); 26 }); 27 }); 28});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.