PageSourceSearch

https://jamonalia.es/wp-content/themes/cdfc/js/sections/faqs.js?ver=7.0.6

js jamonalia.es collected 2026-10-04 20:02:29 UTC 932 bytes, 41 lines download raw bytes

1document.addEventListener('DOMContentLoaded', function () {
2
3    const items = document.querySelectorAll('.faq-item');
4
5    items.forEach(function(item){
6
7        const button = item.querySelector('.faq-question');
8        const answer = item.querySelector('.faq-answer');
9
10        if(item.classList.contains('active')){
11            answer.style.maxHeight = answer.scrollHeight + 'px';
12        }
13
14        button.addEventListener('click', function(){
15
16            const abierto = item.classList.contains('active');
17
18            items.forEach(function(el){
19
20                el.classList.remove('active');
21
22                const ans = el.querySelector('.faq-answer');
23
24                ans.style.maxHeight = null;
25
26            });
27
28            if(!abierto){
29
30                item.classList.add('active');
31
32                answer.style.maxHeight =
33                    answer.scrollHeight + 'px';
34
35            }
36
37        });
38
39    });
40
41});

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.