$(function(){ var tabA = new Swiper('.slide-tabA', { speed:800, ///autoHeight:true, noSwiping : true, noSwipingClass : 'no-swi', spaceBetween:10, effect : 'fade',fadeEffect: {crossFade: true}, slidesPerView: 1, on:{ slideChangeTransitionStart: function(){ $(".umod-a .tabNav li").eq(this.realIndex).addClass('active').siblings().removeClass('active'); } } }); $(".umod-a .tabNav li").click(function(e){ e.preventDefault() $(this).addClass('active').siblings().removeClass('active'); tabA.slideTo( $(this).index() ) }) var tabB = new Swiper('.slide-tabB', { speed:800, autoHeight:true, noSwiping : true, noSwipingClass : 'no-swi', spaceBetween:10, effect : 'fade',fadeEffect: {crossFade: true}, slidesPerView: 1, on:{ slideChangeTransitionStart: function(){ $(".umod-b .tabNav .li").eq(this.realIndex).addClass('active').siblings().removeClass('active'); } } }); $(".umod-b .tabNav .li").click(function(e){ e.preventDefault() $(this).addClass('active').siblings().removeClass('active'); tabB.slideTo( $(this).index() ) }) var slideBg = new Swiper('.slide-baogao', { speed:800, loop:true, autoHeight:true, spaceBetween:0, slidesPerView: 1, //autoplay: { delay: 6000,stopOnLastSlide: false,disableOnInteraction: false,}, pagination: {el: '.slide-baogao .pgba',clickable: true,bulletActiveClass: 'active'}, //navigation: {nextEl: '.slide-cgp .next',prevEl: '.slide-cgp .prev'} breakpoints: { 540: { slidesPerView: 2, }, 900: { slidesPerView: 1, }, 1200: { slidesPerView: 2, }, } }); var slideGsl = new Swiper('.slide-gsl', { speed:1500, loop:true, autoHeight:true, spaceBetween:10, slidesPerView: 1, autoplay: { delay: 6000,stopOnLastSlide: false,disableOnInteraction: false,}, pagination: {el: '.slide-gsp .pgba',clickable: true,bulletActiveClass: 'active'}, navigation: {nextEl: '.slide-gsp .next',prevEl: '.slide-gsp .prev'}, breakpoints: { 1200: { noSwiping : true, noSwipingClass : 'no-swi', } } }); var slideGsr = new Swiper('.slide-gsr', { speed:1500, loop:true, autoHeight:true, spaceBetween:10, noSwiping : true, noSwipingClass : 'no-swi', slidesPerView:1, autoplay: { delay: 6000,stopOnLastSlide: false,disableOnInteraction: false,}, pagination: {el: '.slide-gsp .pgba',clickable: true,bulletActiveClass: 'active'}, navigation: {nextEl: '.slide-gsp .next',prevEl: '.slide-gsp .prev'} }); var slideCg = new Swiper('.slide-cg', { speed:800, loop:true, autoHeight:true, spaceBetween:'5%', slidesPerView: 1, autoplay: { delay:6000,stopOnLastSlide: false,disableOnInteraction: false,}, pagination: {el: '.slide-cgp .pgba',clickable: true,bulletActiveClass: 'active'}, navigation: {nextEl: '.slide-cgp .next',prevEl: '.slide-cgp .prev'}, breakpoints: { 640: { slidesPerView: 2, spaceBetween:'3%', }, 900: { slidesPerView: 2, }, 1200: { slidesPerView: 3, }, } }); })