1// Initialize FancyCarousel as soon as possible for faster loading 2(function() { 3 // Try both ID and class selectors 4 let container = document.querySelector(".is-style-hero-slider"); 5 6 if (!container) { 7 return; // Exit if no slider container found 8 } 9 10 const options = { 11 Autoplay: { 12 timeout: 7000, 13 showProgressbar: false 14 }, 15 transition: "slide", 16 }; 17 18 // Initialize slider function with retry logic 19 function initSlider() { 20 const FancyCarousel = window.FancyCarousel || window.Carousel || window.fancyCarousel; 21 22 const carousel = FancyCarousel(container, options, { Autoplay, Dots }); 23 carousel.init(); 24 25 // Fade in all immediate children of the slider container once carousel is initialized 26 carousel.on('ready', () => { 27 Array.from(container.children).forEach(child => { 28 child.style.opacity = '1'; 29 }); 30 }); 31 32 } 33 34 // Try to initialize immediately if DOM is ready, otherwise wait for DOMContentLoaded 35 if (document.readyState === 'loading') { 36 document.addEventListener('DOMContentLoaded', initSlider); 37 } else { 38 initSlider(); 39 } 40})();
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.