PageSourceSearch

https://sklep-allboards.pl/skins/user/rwd_shoper_8/js/custom/utils/accordion.js

js sklep-allboards.pl collected 2026-10-08 06:31:21 UTC 1,231 bytes, 39 lines download raw bytes

1// Accordion
2export function toggleAccordion() {
3  const accordtionItems = Array.from(
4    document.querySelectorAll('.accordion .tab .title')
5  );
6
7  accordtionItems.forEach((item, index) => {
8    item.setAttribute('item-id', index);
9
10    item.addEventListener('click', (event) => {
11      const itemId = parseInt(event.target.getAttribute('item-id'));
12
13      const filteredArray = accordtionItems.filter(
14        (item, index) => index !== itemId
15      );
16
17      filteredArray.forEach((filteredItem) => {
18        if (filteredItem.classList.contains('open')) {
19          filteredItem.classList.remove('open');
20        }
21
22        if (filteredItem.parentElement.classList.contains('open')) {
23          filteredItem.parentElement.classList.remove('open');
24        }
25
26        filteredItem.nextElementSibling.classList.contains('description')
27          ? filteredItem.nextElementSibling.classList.remove('open')
28          : null;
29      });
30
31      item.classList.toggle('open');
32      item.parentElement.classList.toggle('open');
33      item.nextElementSibling.classList.contains('description')
34        ? item.nextElementSibling.classList.toggle('open')
35        : null;
36    });
37  });
38}
39// Accordion

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.