1$(function(){ 2 var $slideLeng = $('.main-banner-swiper .swiper-slide').length; 3 4 var mainBannerSwiper = new Swiper('.main-banner-swiper', { 5 init: false, 6 loop: $slideLeng > 1 ? true : false, 7 slidesPerView: 1, 8 autoplay: { 9 delay: 4000, 10 disableOnInteraction: false, 11 }, 12 watchOverflow: true, 13 pagination: { 14 el: '.main-banner-pagination', 15 type: 'progressbar', 16 clickable: true, 17 }, 18 }); 19 $(".main-banner-autoplay button").on('click', function(){ 20 if($(this).hasClass('pause')){ 21 mainBannerSwiper.autoplay.stop(); 22 $(this).parent().removeClass('pause').addClass('start'); 23 }else{ 24 mainBannerSwiper.autoplay.start(); 25 $(this).parent().removeClass('start').addClass('pause'); 26 } 27 }); 28 mainBannerSwiper.on('init slideChange', function () { 29 var activeslide = mainBannerSwiper.realIndex; 30 var totalslide = mainBannerSwiper.slides.length; 31 32 // ì¬ë¼ì´ëê° 1ê°ì¸ ê²½ì°, totalslide ê°ì 1ë¡ ê³ ì íì¬ "01/01"ì íìíëë¡ í©ëë¤. 33 if (totalslide === 1) { 34 $(".active-slide").html('01'); 35 $(".total-slide").html('01'); 36 } else { 37 // ì¬ë¼ì´ëê° 2ê° ì´ìì¸ ê²½ì°, ì ìì ì¸ ë°©ìì¼ë¡ ê°ì íìí©ëë¤. 38 $(".active-slide").html(('0' + (activeslide + 1)).slice(-2)); 39 $(".total-slide").html(('0' + (totalslide - 2)).slice(-2)); 40 } 41 }); 42 mainBannerSwiper.init(); 43});
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.