1'use strict'; 2 3$(function () { 4 $('.swiper-container').each(function(){ 5 var self = $(this); 6 var slidesCount = self.find('.swiper-slide').length; 7 8 var mySwiper = new Swiper (self, { 9 direction: 'horizontal', 10 loop: slidesCount > 1 ? true : false, 11 slidesPerView: 'auto', 12 centeredSlides: true, 13 speed: 500, 14 navigation: { 15 nextEl: '.swiper-button-next', 16 prevEl: '.swiper-button-prev', 17 }, 18 breakpoints: { 19 1550: { 20 slidesPerView: 1 21 } 22 }, 23 on: { 24 resize: function () { 25 mySwiper.update(); 26 } 27 } 28 }) 29 30 if(slidesCount <= 1){ 31 self.find('.swiper-button-next, .swiper-button-prev').remove(); 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.