PageSourceSearch

https://www.eifel-direkt.de/_assets/1798f66a72c0609b2ee5b404d10475…/Nucleus/Accordion.65cd236112ed9262c4c4.js

js eifel-direkt.de collected 2026-10-02 19:33:14 UTC 1,982 bytes, 63 lines download raw bytes

1/******/ (() => { // webpackBootstrap
2/******/ 	"use strict";
3// This entry needs to be wrapped in an IIFE because it needs to be isolated against other entry modules.
4(() => {
5// extracted by mini-css-extract-plugin
6
7})();
8
9// This entry needs to be wrapped in an IIFE because it needs to be isolated against other entry modules.
10(() => {
11/*
12 *   This content is licensed according to the W3C Software License at
13 *   https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
14 *
15 *   Simple accordion pattern example
16 */
17
18
19
20class AccordionGroup {
21  constructor(containerEl) {
22    this.containerEl = containerEl;
23    this.items = Array.from(this.containerEl.querySelectorAll('button[aria-expanded]')).map(buttonEl => {
24      const controlsId = buttonEl.getAttribute('aria-controls');
25      const contentEl = document.getElementById(controlsId);
26      const isOpen = buttonEl.getAttribute('aria-expanded') === 'true';
27      buttonEl.setAttribute('aria-expanded', `${isOpen}`);
28      if (isOpen) {
29        contentEl.removeAttribute('hidden');
30      } else {
31        contentEl.setAttribute('hidden', '');
32      }
33      buttonEl.addEventListener('click', () => this.toggleItem(buttonEl));
34      return {
35        buttonEl,
36        contentEl,
37        open: isOpen
38      };
39    });
40  }
41  toggleItem(clickedButton) {
42    this.items.forEach(item => {
43      const isCurrent = item.buttonEl === clickedButton;
44      const shouldOpen = isCurrent ? !item.open : false; // toggle if clicked, close otherwise
45
46      item.open = shouldOpen;
47      item.buttonEl.setAttribute('aria-expanded', `${shouldOpen}`);
48      if (shouldOpen) {
49        item.contentEl.removeAttribute('hidden');
50      } else {
51        item.contentEl.setAttribute('hidden', '');
52      }
53    });
54  }
55}
56window.addEventListener('DOMContentLoaded', () => {
57  const accordionGroups = document.querySelectorAll('.accordion');
58  accordionGroups.forEach(groupEl => new AccordionGroup(groupEl));
59});
60})();
61
62/******/ })()
63;

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.