//移动端导航 $(".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(180deg)") }else{ $(this).parent().find("dl").hide(500); $(this).css("transform","rotate(0deg)") } }); //banner var mySwiper1 = new Swiper('.banner .swiper-container', { speed:1200, loop:true, centeredSlides: true, autoplay: { delay: 5000, disableOnInteraction: false, }, pagination: { el: '.banner .page .swiper-pagination', clickable: true, } }); //学院新闻 var newstxt = new Swiper('.news-scroll-txt .swiper-container', { loop:true, speed:1200, spaceBetween: 10, noSwiping : true, noSwipingClass : 'no-swi' }); var newsimg = new Swiper('.news-scroll-img .swiper-container', { speed:1200, loop:true, autoplay: { delay: 3000, disableOnInteraction: false, }, controller:{control: [newstxt]} }); //通知公告 var scroll_2 = new Swiper('.pbox .swiper-container', { slidesPerView: 4, spaceBetween: 30, loop: true, autoplay: { delay: 5000, disableOnInteraction: false, }, breakpoints: { 980:{ slidesPerView: 3, }, 720:{ slidesPerView: 2, }, 480:{ slidesPerView: 1, } } }); //教学动态、科研动态 var mySwiper2 = new Swiper('.qh-box2 .swiper-container', { speed: 500, effect: 'fade', on: { slideChangeTransitionStart: function () { $(".qh-title2 ul .on").removeClass('on'); $(".qh-title2 ul li").eq(this.activeIndex).addClass('on'); } } }); var mySwiper1 = new Swiper('.qh-more .swiper-container', { speed: 500, effect: 'fade', on: { slideChangeTransitionStart: function () { $(".qh-title2 ul .on").removeClass('on'); $(".qh-title2 ul li").eq(this.activeIndex).addClass('on'); } } }); $(".qh-title2 ul li").on('click', function (e) { $(".qh-title2 ul .on").removeClass('on'); $(this).addClass('on'); mySwiper2.slideTo($(this).index()); mySwiper1.slideTo($(this).index()); }); //党建思政、团学工作 var mySwiper3 = new Swiper('.qh-box1 .swiper-container', { speed: 500, effect: 'fade', on: { slideChangeTransitionStart: function () { $(".qh-title1 ul .on").removeClass('on'); $(".qh-title1 ul li").eq(this.activeIndex).addClass('on'); } } }); $(".qh-title1 ul li").on('click', function (e) { $(".qh-title1 ul .on").removeClass('on'); $(this).addClass('on'); mySwiper3.slideTo($(this).index()); }); //数据信院 var swiper4 = new Swiper('.pebox .swiper-container', { slidesPerView: 5, //spaceBetween: 30, centeredSlides: true, loop: true, autoplay: { delay: 5000, disableOnInteraction: false, }, on: { init: function(swiper4){ $('.date_txt h3').countUp({delay: 20,time: 2000}); } }, breakpoints: { 920:{ slidesPerView: 3, }, 560:{ slidesPerView: 2, } } }); //媒体报道 var swiper5 = new Swiper('.pfbox .swiper-container', { slidesPerView: 4, spaceBetween: 30, loop: true, autoplay: { delay: 5000, disableOnInteraction: false, }, breakpoints: { 980:{ slidesPerView: 3, }, 720:{ slidesPerView: 2, }, 480:{ slidesPerView: 1, } } });