1XA.component.dgcSimpleCarousel = (function($) { 2 const api = {}; 3 4 api.dgcSimpleCarouselInit = function(component) { 5 6 7 8 9 const slickSettings = { 10 arrows: false, 11 slidesToShow: 1, 12 slidesToScroll: 1, 13 lazyLoad: "ondemand", 14 infinite: true, 15 autoplay: true, 16 fade: true, 17 speed: 1000, 18 autoplaySpeed: 2000, 19 pauseOnHover: false, 20 pauseOnFocus: false, 21 }; 22 component.slick(slickSettings); 23 $(window).on("resize", function () { 24 if (!component.hasClass("slick-initialized")) { 25 component.slick(slickSettings); 26 } 27 }); 28 }; 29 30 api.init = function() { 31 const slickElements = $(".dgc-simple-carousel__container"); 32 33 slickElements.each(function() { 34 api.dgcSimpleCarouselInit($(this)); 35 $(this).addClass('initialized'); 36 }); 37 }; 38 39 return api; 40})(jQuery); 41 42XA.register('dgc-simple-carousel', XA.component.dgcSimpleCarousel);
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.