PageSourceSearch

https://20km.ch/modules/mod_faq/js/scriptFaq.js

js 20km.ch collected 2026-10-04 08:33:13 UTC 797 bytes, 27 lines download raw bytes

1$(document).ready(function () {
2  $('.faq-item').on('click', function () {
3    const $faqItem = $(this);
4    const $question = $faqItem.find('.faq-question');
5    const $answer = $faqItem.next();
6    const $icon = $faqItem.find('i');
7
8    $('.faq-item').not($faqItem).each(function () {
9      const $otherItem = $(this);
10      const $otherAnswer = $otherItem.next();
11      const $otherIcon = $otherItem.find('i');
12
13      $otherAnswer.removeClass('active');
14      $otherIcon.removeClass('active');
15      $otherAnswer.css('max-height', '0');
16    });
17
18    $answer.toggleClass('active');
19    $icon.toggleClass('active');
20    
21    if ($answer.hasClass('active')) {
22      $answer.css('max-height', $answer.prop('scrollHeight') + 'px');
23    } else {
24      $answer.css('max-height', '0');
25    }
26  });
27});

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.