테스트중

This commit is contained in:
hyeonggil
2024-02-18 11:31:23 +09:00
parent edc92db14c
commit 24f3c4835b

View File

@@ -179,10 +179,11 @@ $(document).ready(function() {
loop:true,
freeMode: true,
autoplay: {
pauseOnMouseEnter: true,
delay:1,
disableOnInteraction: false,
},
speed: 4000,
speed: 3000,
breakpoints: {
// when window width is >= 320px
320: {
@@ -195,20 +196,26 @@ $(document).ready(function() {
640: {
spaceBetween: 20,
}
}
},
on: {
init: function (swiper) {
console.log('swiper initialized')
var swiperContainer = document.querySelector('.swiper-container');
// Pause autoplay when mouse enters the Swiper container
swiperContainer.addEventListener('mouseenter', function() {
swiperTheme.autoplay.stop();
});
// Resume autoplay when mouse leaves the Swiper container
swiperContainer.addEventListener('mouseleave', function() {
swiperTheme.autoplay.start();
});
},
},
});
$('.pdpDisplayThemeSwiper').on('mouseleave', function() {
console.log("시작")
swiperTheme.autoplay.start();
});
$('.pdpDisplayThemeSwiper').on('mouseenter', function() {
console.log("멈춰")
swiperTheme.autoplay.stop();
});
//마이페이지 lnb 스와이프