mirror of
https://github.com/JasonsGong/JasonsGong.github.io.git
synced 2024-11-24 11:29:36 +08:00
27 lines
573 B
JavaScript
27 lines
573 B
JavaScript
var swiper = new Swiper('.blog-slider', {
|
|
passiveListeners: true,
|
|
spaceBetween: 30,
|
|
effect: 'fade',
|
|
loop: true,
|
|
autoplay: {
|
|
disableOnInteraction: true,
|
|
delay: 3000
|
|
},
|
|
mousewheel: true,
|
|
// autoHeight: true,
|
|
pagination: {
|
|
el: '.blog-slider__pagination',
|
|
clickable: true,
|
|
}
|
|
});
|
|
|
|
var comtainer = document.getElementById('swiper_container');
|
|
if (comtainer !== null) {
|
|
comtainer.onmouseenter = function() {
|
|
swiper.autoplay.stop();
|
|
};
|
|
comtainer.onmouseleave = function() {
|
|
swiper.autoplay.start();
|
|
}
|
|
} else {}
|