javascript - 如何让多个带有拇指的滑动器画廊在同一页面上工作
问题描述
var galleryThumbs = new Swiper('.gallery-thumbs', {
spaceBetween: 10,
slidesPerView: 4,
loop: true,
freeMode: true,
loopedSlides: 5, //looped slides should be the same
watchSlidesVisibility: true,
watchSlidesProgress: true,
});
var galleryTop = new Swiper('.gallery-top', {
spaceBetween: 10,
loop: true,
loopedSlides: 5, //looped slides should be the same
navigation: {
nextEl: '.swiper-button-next',
prevEl: '.swiper-button-prev',
},
thumbs: {
swiper: galleryThumbs,
},
});
问题是当我想在一页中使用两个以上的 Swiper 拇指时,它们将无法正确链接(galleryThumbs,galleryTop),我想我知道问题出在这部分:
thumbs: {
swiper: galleryThumbs,
},
解决方案
推荐阅读
- python - Pygame 图形:鼠标控制。
- tensorflow - 了解 tf.contrib.seq2seq.dynamic_docode 的 final_outputs
- javascript - 我可以防止自动排序 JS 对象数字属性吗?
- angular5 - 如何避免出现多个错误信息?
- c# - 使用 NuGet 和 C# 打包 Sqlite 数据库
- r - 读取具有混合几何图形的 geojson 文件 geojsonio::geojson_read
- sql-server - 调试器未正确安装 SSIS
- visual-studio-code - 如何完全关闭在 Visual Studio 代码上打开的文件?
- python - Simple Yes or No Loop Python3
- php - 如果域的字符串长度小于 5,我想要一个包含五个字母的字符串,我想将随机生成的字符串与域名连接起来