PageSourceSearch

https://www.ebacourse.org/resources/themes/vetdigital/template-parts/flex/blocks/js/text_faq.js?ver=1787906287

js ebacourse.org collected 2026-10-06 03:23:27 UTC 741 bytes, 21 lines download raw bytes

1document.addEventListener('DOMContentLoaded', function() {
2
3  const faqs = document.querySelectorAll('.faq-item');
4
5  faqs.forEach(function(faq, index){
6    const question = faq.querySelector('.faq-item__question');
7    const button = faq.querySelector('.faq-item__button');
8    const answer = faq.querySelector('.faq-item__answer');
9
10    button.addEventListener('click', function(e){
11      e.preventDefault();
12      faq.classList.toggle('faq-item--toggle');
13      answer.classList.toggle('faq-item__answer--toggle');
14
15      const currentAria = button.getAttribute('aria-expanded');
16      const newAria = currentAria === 'true' ? 'false' : 'true';
17      button.setAttribute('aria-expanded', newAria);
18    });
19  });
20
21});

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.