$(function(){ var swiper = new Swiper('.top-container', { slidesPerView: 1, loop: true, speed: 1000, centeredSlides:true, pagination: { el: '.swiper-pagination', clickable: true, }, autoplay: { delay: 4000, disableOnInteraction: false, }, breakpoints: { 1367: { slidesPerView: 3, }, } }); slidepos(); /* $('.sliders').infiniteslide({ pauseonhover:false, clone:2, }); */ }); $(window).on('load',function(){ slidepos(); }); $(window).on('resize',function () { slidepos(); }); $(window).on('orientationchange', function(){ }); function slidepos(){ if($(window).width() > 1366){ var ww = $(window).width()/2; $('#mainimg .top-container').css('left',(ww - 2049)+'px'); }else{ $('#mainimg .top-container').removeAttr('style'); } }