|
本帖最后由 xjg 于 2020-2-28 19:57 编辑
- $.extend({
- "swiperOption": function ( f1, f2, f3, f4) {
- new Swiper(f1.find('.swiper-container'), {
- autoplay: true,
- speed: 1000,
- pagination: {
- el: f2,
- clickable: true,
- },
- autoplayDisableOnInteraction: false,
- navigation: {
- nextEl: f4,
- prevEl: f3,
- },
- paginationClickable: true,
- observer: true,
- observeParents: true,
- });
- },
- });
- $(".tab-pane").each(function (index) {
- $.swiperOption( $(this), $(this).find(".swiper-pagination"), $(this).find(".swiper-button-prev"), $(this).find(".swiper-button-next"));
- });
复制代码 页面加载好之后所有swiper都会自动翻到第二页,之后不显示的tab就不会在继续翻页,导致切换到后面几个tab时都显示的时第二页,这是什么问题?
就像这样
|
|