1/* 2 ãããç»é¢ç¨ã¬ã³ã¡ã³ãã®ã¹ã©ã¤ãã¼è¨å® 3*/ 4$(document).ready(function () { 5 $(".c_swiperSlider").each(function () { 6 var $swiperElement = $(this).find(".swiper"); 7 var swiperInstance = $swiperElement[0]?.swiper; 8 9 // ã«ã¹ã¿ã ã¹ã©ã¤ãåä½ã®è¿½å 10 var $nextButton = $(this).find(".swiper-button-next"); 11 var $prevButton = $(this).find(".swiper-button-prev"); 12 13 // ã¯ã©ã¹ã«å¿ããã¹ã©ã¤ãæ°ãæ±ºå® 14 function getSlideStep($element) { 15 if ($element.closest(".c_swiperSlider").hasClass("c_swiperSlider--col6-3")) { 16 return 5; // col6-3ã®å ´åã¯5ä»¶ã¹ã©ã¤ã 17 } else if ($element.closest(".c_swiperSlider").hasClass("c_swiperSlider--col3-1")) { 18 return 3; // col3-1ã®å ´åã¯3ä»¶ã¹ã©ã¤ã 19 } 20 return 1; // ããã©ã«ãã¯1ä»¶ 21 } 22 23 // 次ã¸ãã¿ã³ã®ã«ã¹ã¿ã åä½ 24 $nextButton.on("click", function(e) { 25 e.preventDefault(); 26 27 var slideStep = getSlideStep($(this)); 28 var nextIndex = swiperInstance.activeIndex + slideStep; 29 30 // çµç«¯ãè¶ ããªãããã«ãã§ã㯠31 if (nextIndex < swiperInstance.slides.length) { 32 swiperInstance.slideTo(nextIndex); 33 } else { 34 swiperInstance.slideTo(swiperInstance.slides.length - 1); // æå¾ã®ã¹ã©ã¤ã 35 } 36 }); 37 38 // åã¸ãã¿ã³ã®ã«ã¹ã¿ã åä½ 39 $prevButton.on("click", function(e) { 40 e.preventDefault(); 41 42 var slideStep = getSlideStep($(this)); 43 var prevIndex = swiperInstance.activeIndex - slideStep; 44 45 // å§ç«¯ãè¶ ããªãããã«ãã§ã㯠46 if (prevIndex >= 0) { 47 swiperInstance.slideTo(prevIndex); 48 } else { 49 swiperInstance.slideTo(0); // æåã®ã¹ã©ã¤ã 50 } 51 }); 52 }); 53});
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.