//无障碍弹出 $(".see_on").click(function(){ $(this).parents(".pcbody").addClass("down"); }); //移动端导航 $("#selectBut").click(function() { $(".navm-box").slideToggle("slow"); $("body").toggleClass("navShow"); if($("#selectBut").hasClass("hd1-aon1")) { $(this).removeClass("hd1-aon1") } else { $(this).addClass("hd1-aon1") } }) $(".nav-wrap .iconfont").click(function(){ if($(this).parent().find("dl").is(":hidden")){ $(this).parent().find("dl").show(500); $(this).css("transform","rotate(0deg)") }else{ $(this).parent().find("dl").hide(500); $(this).css("transform","rotate(45deg)") } }); //搜索框弹出 $('.search_m').click(function(){ $('.search_wrap').fadeIn(); if($('.search_m').hasClass("icon-close")) { $(this).removeClass("icon-close"); $('.search_wrap').fadeOut("slow"); $(this).addClass("icon-search") } else { $(this).removeClass("icon-search"); $(this).addClass("icon-close") } }); //banner var mySwiper = new Swiper('.banner', { speed:1200, loop:true, centeredSlides: true, effect:'fade', autoplay: { delay: 5000, disableOnInteraction: false, }, pagination: { el: '.swiper-pagination', clickable: true, renderBullet: function (index, className) { return '' + '0' + (index + 1) + ''; }, }, on:{ init: function(){ swiperAnimateCache(this); swiperAnimate(this); }, slideChangeTransitionEnd: function(){ swiperAnimate(this); } } }); //鼠标覆盖停止自动切换 mySwiper.el.onmouseover = function(){ mySwiper.autoplay.stop(); } //鼠标离开开始自动切换 mySwiper.el.onmouseout = function(){ mySwiper.autoplay.start(); } //专题 var swiper1 = new Swiper('.zt', { //loop:true, slidesPerView: 4, spaceBetween: 30, autoplay: { delay: 3000, disableOnInteraction: false, }, pagination: { el: '.swiper-pagination', }, breakpoints: { 880: { slidesPerView: 3, }, 620: { slidesPerView: 2, }, } }); swiper1.el.onmouseover = function(){ swiper1.autoplay.stop(); } swiper1.el.onmouseout = function(){ swiper1.autoplay.start(); } //聚焦校园 var swiper2 = new Swiper('.p3box', { loop:true, slidesPerView: 3, centeredSlides: true, spaceBetween: 30, autoplay: { delay: 3000, disableOnInteraction: false, }, breakpoints: { 880: { slidesPerView: 2, centeredSlides: false, }, 480: { slidesPerView: 2, centeredSlides: true, spaceBetween: 20, }, 420: { slidesPerView: 1, centeredSlides: false, spaceBetween: 20, }, } }); swiper2.el.onmouseover = function(){ swiper2.autoplay.stop(); $(".p3box .swiper-slide").mouseover(function(){ $(".p3box .swiper-slide-active").addClass("on"); }) $(".p3box .swiper-slide-active").mouseover(function(){ $(this).addClass("out"); }) } swiper2.el.onmouseout = function(){ swiper2.autoplay.start(); $(".p3box .swiper-slide").mouseout(function(){ $(".p3box .swiper-slide-active").removeClass("on"); }) $(".p3box .swiper-slide-active").mouseout(function(){ $(this).removeClass("out"); }) } //临职要闻 var newsimg = new Swiper('.news-img', { speed:1200, loop:true, noSwiping : true, noSwipingClass : 'no-swi', pagination: { el: '.news-img .swiper-pagination' } }); var newstxt = new Swiper('.news-txt', { loop:true, speed:1200, spaceBetween: 30, autoplay: { delay: 3000, disableOnInteraction: false, }, navigation: { nextEl: '.swiper-button-next', prevEl: '.swiper-button-prev', }, controller:{control: [newsimg]} }); newstxt.el.onmouseover = function(){ newstxt.autoplay.stop(); } newsimg.el.onmouseover = function(){ newstxt.autoplay.stop(); } newstxt.el.onmouseout = function(){ newstxt.autoplay.start(); } newsimg.el.onmouseout = function(){ newstxt.autoplay.start(); } //返回顶部 $('.to-top').toTop({ autohide:false, position:false, speed:1000 }); //快捷导航 $(function(){ $(".link1 .hidebtn").click(function(){ $(this).parent().stop().animate({right:"-74px"},500,function(){$(".link2").stop().animate({right:"0"},500);}) }) $(".link2 .hidess").click(function(){ $(this).parent().stop().animate({right:"-74px"},500); $(".link1").stop().animate({right:"0"},500) }) }); //快捷导航手机端 $("#gooey-v").gooeymenu({ bgColor: "#009182", contentColor: "white", style: "vertical", horizontal: { menuItemPosition: "glue" }, vertical: { menuItemPosition: "spaced", direction: "up" }, circle: { radius: 90 }, margin: "small", size: 70, bounce: true, bounceLength: "small", transitionStep: 100, hover: "#009182" }); //wow var wow = new WOW({ boxClass: 'wow', animateClass: 'animated', offset: 0, mobile: false, live: true }); new WOW().init();