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