1document.addEventListener('DOMContentLoaded', function () { 2 document.querySelectorAll('.umu-carousel').forEach(function (carousel) { 3 var slides = carousel.querySelectorAll('.umu-carousel-slide'); 4 var dots = carousel.querySelectorAll('.umu-dot'); 5 var index = 0; 6 7 if (slides.length < 2) return; // nothing to slide 8 9 function show(i) { 10 slides.forEach(function (s) { s.classList.remove('active'); }); 11 dots.forEach(function (d) { d.classList.remove('active'); }); 12 slides[i].classList.add('active'); 13 if (dots[i]) dots[i].classList.add('active'); 14 index = i; 15 } 16 17 var prevBtn = carousel.querySelector('.umu-carousel-prev'); 18 var nextBtn = carousel.querySelector('.umu-carousel-next'); 19 20 if (prevBtn) { 21 prevBtn.addEventListener('click', function () { 22 show((index - 1 + slides.length) % slides.length); 23 }); 24 } 25 if (nextBtn) { 26 nextBtn.addEventListener('click', function () { 27 show((index + 1) % slides.length); 28 }); 29 } 30 dots.forEach(function (dot, i) { 31 dot.addEventListener('click', function () { show(i); }); 32 }); 33 }); 34});
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.