1const topJs = []; 2 3$(function () { 4 topJs.slider(); 5}); 6 7topJs.slider = function () { 8 const init = function () { 9 kvSlide(); 10 }; 11 12 const kvSlide = function () { 13 const $wrap = $('[data-js-kev-slider]'); 14 const $slider = $wrap.find('[data-js-slide]'); 15 const $sliderDoc = $wrap.find('[data-js-slide-dot]'); 16 const $sliderBtn = $wrap.find('[data-js-slide-btn]'); 17 18 const stopClass = 'js-stop'; 19 const startClass = 'js-start'; 20 21 $sliderBtn.addClass(startClass); 22 23 $slider.slick({ 24 dots: true, 25 arrows: false, 26 autoplay: true, 27 autoplaySpeed: 5000, 28 swipeToSlide: true, 29 slidesToShow: 1, 30 appendArrows: $sliderDoc, 31 appendDots: $sliderDoc, 32 prevArrow: '<button type="button" class="slick-prev"></button>', 33 nextArrow: '<button type="button" class="slick-next"></button>', 34 }); 35 36 $sliderBtn.on("click", function () { 37 if ($(this).hasClass(startClass)) { 38 $slider.slick("slickPause"); 39 $sliderBtn.addClass(stopClass); 40 $sliderBtn.removeClass(startClass); 41 } else { 42 $slider.slick("slickPlay"); 43 $sliderBtn.addClass(startClass); 44 $sliderBtn.removeClass(stopClass); 45 46 } 47 }); 48 }; 49 50 init(); 51};
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.