1 2function expandContent(event) { 3 const button = event.target.closest('button'); 4 if (!button) return; 5 6 const faq = button.closest('.faq'); 7 if (!faq) return; 8 9 const expandableContent = faq.querySelector('.expandable-faq-content'); 10 if (!expandableContent) return; 11 12 button.classList.toggle('expanded'); 13 14 if (expandableContent.classList.contains('expanded')) { 15 expandableContent.style.height = expandableContent.scrollHeight + 'px'; 16 requestAnimationFrame(() => { 17 expandableContent.style.height = '0'; 18 expandableContent.classList.remove('expanded'); 19 }); 20 } else { 21 expandableContent.style.height = 'auto'; 22 const height = expandableContent.scrollHeight + 'px'; 23 expandableContent.style.height = '0'; 24 requestAnimationFrame(() => { 25 expandableContent.classList.add('expanded'); 26 expandableContent.style.height = height; 27 }); 28 expandableContent.addEventListener('transitionend', function handleTransitionEnd() { 29 expandableContent.style.height = 'auto'; 30 expandableContent.removeEventListener('transitionend', handleTransitionEnd); 31 }); 32 } 33} 34 35const faqButtons = document.querySelectorAll('.content-block button'); 36faqButtons.forEach(button => { 37 button.addEventListener('click', expandContent); 38});
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.