//移动端导航 $(".selectBut").click(function() { $(".navm-box").toggleClass("act"); $("body").toggleClass("navShow"); if($(".selectBut").hasClass("hd1-aon1")) { $(this).removeClass("hd1-aon1"); $(".masklayer").hide() } else { $(this).addClass("hd1-aon1"); $(".masklayer").fadeIn("slow") } }) $(".nav-wrap .icon-jia").click(function(){ if($(this).parent().find("dl").is(":hidden")){ $(this).parent().find("dl").show(500); $(this).css("transform","rotate(45deg)") }else{ $(this).parent().find("dl").hide(500); $(this).css("transform","rotate(0deg)") } }); //搜索 $('.search').click(function(){ $('.search_wrap').fadeIn(); }); $('.search_wrap .bck').click(function(){ $('.search_wrap').fadeOut("slow"); }); //banner var mySwiper1 = new Swiper('.banner .swiper-container', { speed:1200, loop:true, centeredSlides: true, autoplay: { delay: 5000, disableOnInteraction: false, }, pagination: { el: '.banner .swiper-pagination', clickable: true, }, navigation: { prevEl: '.banner .swiper-button-prev', nextEl: '.banner .swiper-button-next', } }); //新闻滚动图 var mySwiper3 = new Swiper('.txt-scroll .swiper-container', { loop:true, spaceBetween: 20, speed:800, noSwiping : true, noSwipingClass : 'no-swi', }); var mySwiper2 = new Swiper('.img-scroll', { speed:800, loop:true, autoplay: { delay: 5000, disableOnInteraction: false, }, controller:{control: [mySwiper3]}, pagination: { el: '.txt-scroll .swiper-pagination', clickable: true, }, navigation: { prevEl: '.img-scroll .swiper-button-prev', nextEl: '.img-scroll .swiper-button-next', } }); var mySwiper6 = new Swiper('.news-list .swiper-container', { direction: 'vertical', loop:true, autoplay: { delay: 3000, disableOnInteraction: false, }, slidesPerView : 3, allowTouchMove: false, navigation: { prevEl: '.news-list .swiper-button-prev', nextEl: '.news-list .swiper-button-next', } }); //团学风采 var mySwiper4 = new Swiper('.pc-txt .swiper-container', { // loop:true, spaceBetween: 20, speed:800, noSwiping : true, noSwipingClass : 'no-swi', }); var mySwiper5 = new Swiper('.pc-img .swiper-container', { speed:800, // simulateTouch:false, //loop:true, autoplay: { delay: 5000, disableOnInteraction: false, }, controller:{control: [mySwiper4]}, navigation: { prevEl: '.pc-txt .swiper-button-prev', nextEl: '.pc-txt .swiper-button-next', }, on: { slideChangeTransitionStart: function () { $(".pc-right ul .on").removeClass('on'); $(".pc-right ul li").eq(this.activeIndex).addClass('on'); } } }); $(".pc-right ul li").on('mouseenter', function (e) { $(".pc-right ul .on").removeClass('on'); $(this).addClass('on'); mySwiper5.slideTo($(this).index()); }); var scroll_5 = new Swiper('.pb-list .swiper-container', { slidesPerView: 4, loop:true, autoplay: { delay: 3000, disableOnInteraction: false, }, spaceBetween: 30, //navigation: { //prevEl: '.news-scroll-5 .swiper-button-prev', //nextEl: '.news-scroll-5 .swiper-button-next', //}, breakpoints: { 980:{ slidesPerView: 3, }, 780:{ slidesPerView: 2, }, 480:{ slidesPerView: 1, } } });