diff --git a/Public/Mobile/js/home.js b/Public/Mobile/js/home.js index 9c8a6ef15..a131a6b20 100644 --- a/Public/Mobile/js/home.js +++ b/Public/Mobile/js/home.js @@ -1,17 +1,27 @@ $(function(){ var img = $(".swiper-container .swiper-slide").length; - var swiper = new Swiper('.swiper-container', { - loop: true, - pagination: { - el: '.swiper-pagination', - clickable: true, - }, - /*autoplay: { - delay: 3000, - stopOnLastSlide: false, - disableOnInteraction: false, - },*/ - autoplay: img > 1, - }); + + if(img<=1){ + var swiper = new Swiper('.swiper-container', { + loop: true, + autoplay: img > 1, + pagination: { + el: '.swiper-pagination', + clickable: true, + }, + }); + }else{ + var swiper = new Swiper('.swiper-container', { + loop: true, + pagination: { + el: '.swiper-pagination', + clickable: true, + }, + autoplay: { + stopOnLastSlide: false, + disableOnInteraction: false, + }, + }); + } }); \ No newline at end of file