PageSourceSearch

https://forgames.cz/wp-content/plugins/abf-custom-blocks/src/js/faq.js?ver=1790409615

js forgames.cz collected 2026-10-08 23:36:18 UTC 1,127 bytes, 28 lines download raw bytes

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.