Files
BlackFruit-UI/js/tools.js
yiqiu 191c63a90b
All checks were successful
continuous-integration/drone/push Build is passing
打发发达 大法
2025-11-23 00:46:33 +08:00

35 lines
849 B
JavaScript

$(function () {
var galleryThumbs = new Swiper('.gallery-thumbs', {
spaceBetween: 10,
slidesPerView: 10,
freeMode: true,
watchSlidesVisibility: true,
watchSlidesProgress: true,
noSwiping: true
});
var galleryTop = new Swiper('.gallery-top', {
spaceBetween: 10,
thumbs: {
swiper: galleryThumbs
},
navigation: {
nextEl: '.swiper-button-next',
prevEl: '.swiper-button-prev',
},
});
const mySwiper = new Swiper(".swiper", {
loop: true, // 循环模式选项
autoplay: {
delay: 5000, // 5秒自动切换
disableOnInteraction: false, // 用户操作后继续自动播放
},
speed: 800, // 切换速度
// 如果需要分页器
pagination: {
el: ".swiper-pagination",
clickable: true,
},
});
})