1class Carousel { 2 constructor() { 3 this.selector = '.carousel-section'; 4 5 this.selectors = { 6 list: `${this.selector}__slides`, 7 } 8 } 9 10 getNodes() { 11 this.nodes = { 12 sliders: [ ...document.querySelectorAll(this.selectors.list) ] 13 } 14 } 15 16 initSlides() { 17 const { sliders } = this.nodes; 18 19 if(!sliders) { 20 return; 21 } 22 23 sliders.forEach(slider => { 24 if(slider.children.length > 1) { 25 jQuery(slider).slick({ 26 dots: true, 27 centerMode: true, 28 fade: true, 29 adaptiveHeight: false, 30 speed: 1000 31 }) 32 } 33 }) 34 } 35 36 init() { 37 this.getNodes(); 38 this.initSlides(); 39 } 40} 41 42const carouselSection = new Carousel(); 43carouselSection.init();
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.