; var default_control_ops = { init: function () { this.eventBind(); }, eventBind: function () { var num; var width = $(document).width(); if(width <= 1200){ num = 1; }else { num = 3; } var certifySwiper = new Swiper('#certify .swiper-container', { slidesPerView: num, spaceBetween: 30, slidesPerGroup: num, loop: true, loopFillGroupWithBlank: true, autoplay:true, navigation: { nextEl: '.swiper-button-next', prevEl: '.swiper-button-prev', }, pagination: { el: '.swiper-pagination', clickable :true, } }) } }; $(document).ready(function () { default_control_ops.init(); });