|
这个原理就是写三个轮播,分别定位上去,好麻烦,各位不用去下载了,我源码给你们解密出来,
'use strict';
var currentSwiper = new Swiper('.current-swiper', {
loop: true
});
currentSwiper.$el.parent().find('.swiper-button-next').on('click', function() {
currentSwiper.slideNext()
});
currentSwiper.$el.parent().find('.swiper-button-prev').on('click', function() {
currentSwiper.slidePrev()
});
var leftSwiper = new Swiper('.left-swiper', {
loop: true,
simulateTouch: false
});
var rightSwiper = new Swiper('.right-swiper', {
loop: true,
simulateTouch: false
});
currentSwiper.controller.control = [leftSwiper, rightSwiper]; |
|