手机官网轮播图
parent
f9eedf339b
commit
ef879b9bfb
@ -1,17 +1,27 @@
|
||||
$(function(){
|
||||
var img = $(".swiper-container .swiper-slide").length;
|
||||
|
||||
if(img<=1){
|
||||
var swiper = new Swiper('.swiper-container', {
|
||||
loop: true,
|
||||
autoplay: img > 1,
|
||||
pagination: {
|
||||
el: '.swiper-pagination',
|
||||
clickable: true,
|
||||
},
|
||||
/*autoplay: {
|
||||
delay: 3000,
|
||||
});
|
||||
}else{
|
||||
var swiper = new Swiper('.swiper-container', {
|
||||
loop: true,
|
||||
pagination: {
|
||||
el: '.swiper-pagination',
|
||||
clickable: true,
|
||||
},
|
||||
autoplay: {
|
||||
stopOnLastSlide: false,
|
||||
disableOnInteraction: false,
|
||||
},*/
|
||||
autoplay: img > 1,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
});
|
Loading…
Reference in New Issue