swiper the movable end plug, around a plurality swiper When a blank problem sliding

Before the project uses a more swiper, but the structure of the code structure css, js and almost the same
except around the first slide has a swiper rebound, others do not rebound, then tried a variety of methods will not work.

Puzzled, and finally found a solution in the official website, what is the code
HTML code

<nav>
<div class="swiper-container" id="swiper">
<ul class="swiper-wrapper tabTwo">
<li class="swiper-slide curTwo active"><a href="javascript:void(0);">2019</a><p class="bord"></p></li>
<li class="swiper-slide"><a href="javascript:void(0);">2018</a><p class="bord"></p></li>
<li class="swiper-slide"><a href="javascript:void(0);">2017</a><p class="bord"></p></li>
<li class="swiper-slide"><a href="javascript:void(0);">2016</a><p class="bord"></p></li>
</ul>
</div>
<div class="shade"></div>
</nav>
<div class="month on">
<div class="swiper-container">
<ul class="swiper-wrapper tab">
<li class="swiper-slide cur twoActive"><a href="javascript:void(0);">11</a></li>
<li class="swiper-slide"><a href="javascript:void(0);">11</a></li>
<li class="swiper-slide"><a href="javascript:void(0);">11</a></li>
<li class="swiper-slide"><a href="javascript:void(0);">11</a></li>
</ul>
</div>
</div>

<div class="month">
<div class="swiper-container">
<ul class="swiper-wrapper tab">
<li class="swiper-slide cur twoActive"><a href="javascript:void(0);">12</a></li>
<li class="swiper-slide"><a href="javascript:void(0);">12</a></li>
<Li class = "Slide-Swiper"> <a href="javascript:void(0);"> </a> 12 is </ Li>
<Li class = "Slide-Swiper"> <A the href = "JavaScript: void (0); "> 12 is </a> </ Li>
</ UL>
</ div>
</ div>

four or five Swiper

then JS code: var mySwiper = new Swiper (, { 'swiper-container.'

autoplay: false, // optional, automatic slide
    slidesPerView: "Auto", 
the Observer: to true,
observeParents: to true,
});
a js code can control all of the swiper, because of what the structure are the same
only need to add the following two sentences on this original swioer, js Code listening swiper on the line
the Observer: to true,
observeParents: to true,

Guess you like

Origin www.cnblogs.com/MrQinjj/p/12102450.html