有人知道使用Swiper API可以做多行缩略图吗?
我有这样的HTML:
<div class="thumbnails first">
<div class="slide"></div>
</div>
<div class="main-slide"></div>
<div class="thumbnails second">
<div class="slide"></div>
</div>
正如文档所述,我们可以将一个缩略图链接到主滑块,但是是否有可能从两个“缩略图”类中获取幻灯片?
我尝试附加更多这样的幻灯片:
var galleryThumbs = new Swiper('.thumbnails.first', {
slidesPerView: 6,
freeModeMomentum: false,
slideClass: 'slide'
});
galleryThumbs.slides = $('.thumbnails');
var galleryTop = new Swiper('.main-slide', {
thumbs: {
swiper: galleryThumbs
}
});
OR
var galleryThumbs = new Swiper('.thumbnails', {
slidesPerView: 6,
freeModeMomentum: false,
slideClass: 'slide'
});
var galleryTop = new Swiper('.main-slide', {
thumbs: {
swiper: galleryThumbs
}
});
OR
var galleryThumbs = new Swiper('.thumbnails.first', {
slidesPerView: 6,
freeModeMomentum: false,
slideClass: 'slide'
});
var galleryThumbs2 = new Swiper('.thumbnails.second', {
slidesPerView: 6,
freeModeMomentum: false,
slideClass: 'slide'
});
var galleryTop = new Swiper('.main-slide', {
thumbs: {
swiper: [galleryThumbs, galleryThumbs2]
}
});
没有用,您有什么主意吗?