1function initMovingAveragesTabs(container) { 2 const tabs = container.querySelectorAll('.moving-averages__tab'); 3 const contents = container.querySelectorAll('.moving-averages__content'); 4 5 tabs?.forEach((tab, index) => { 6 tab.addEventListener('click', () => { 7 tabs.forEach((t) => t.classList.remove('active')); 8 contents.forEach((c) => c.classList.remove('active')); 9 10 tab.classList.add('active'); 11 contents[index].classList.add('active'); 12 }); 13 }); 14 15 if (tabs[0]) { 16 tabs[0].classList.add('active'); 17 } 18 if (contents[0]) { 19 contents[0].classList.add('active'); 20 } 21} 22 23document.addEventListener('DOMContentLoaded', function () { 24 const allContainers = document.querySelectorAll('.moving-averages__container'); 25 26 allContainers.forEach(container => { 27 initMovingAveragesTabs(container); 28 }); 29}); 30
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.