PageSourceSearch

https://zi.de/_assets/4483a80560873394161ba712d6ca7e9e/JS/_accordion-bf1ee168.js

js zi.de collected 2026-10-03 21:18:47 UTC 1,424 bytes, 43 lines download raw bytes

1//
2// Accordion
3//
4
5function init() {
6  var accordionElement = document.querySelectorAll('.ce-accordion') || [];
7
8  // click on span to avoid conflicts in search filters
9  var accordionToggle = document.querySelectorAll('.ce-accordion-toggle') || [];
10  if (accordionElement.length) {
11    accordionToggle.forEach(function (el) {
12      el.addEventListener('click', function () {
13        accordionTrigger(el);
14      }, false);
15      el.addEventListener('keypress', function () {
16        accordionTrigger(el);
17      }, false);
18    });
19  }
20  function accordionTrigger(el) {
21    var ariaState = el.getAttribute('aria-expanded'),
22      accordionToggleID = el.getAttribute('aria-controls'),
23      accordionTitle = el.parentNode;
24    if (ariaState == "false") {
25      // open this accordion
26      el.setAttribute('aria-expanded', 'true');
27      accordionTitle.classList.add('expanded');
28      accordionTitle.parentNode.classList.add('active');
29      document.getElementById(accordionToggleID).classList.add('show');
30    } else {
31      // close this accordion
32      el.setAttribute('aria-expanded', 'false');
33      accordionTitle.classList.remove('expanded');
34      accordionTitle.parentNode.classList.remove('active');
35      document.getElementById(accordionToggleID).classList.remove('show');
36    }
37  }
38}
39var _accordion = {};
40var Init = init;
41
42export { Init, _accordion as default };
43//# sourceMappingURL=_accordion-bf1ee168.js.map

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.