//导航 jQuery("#nav").slide({ type:"menu",// 效果类型,针对菜单/导航而引入的参数(默认slide) titCell:".nLi", //鼠标触发对象 targetCell:".sub", //titCell里面包含的要显示/消失的对象 effect:"slideDown", //targetCell下拉效果 delayTime:300 , //效果时间 triggerTime:0, //鼠标延迟触发时间(默认150) returnDefault:true //鼠标移走后返回默认状态,例如默认频道是“预告片”,鼠标移走后会返回“预告片”(默认false) }); //移动端导航 $("#selectBut").click(function() { $("body").toggleClass("navShow"); $(".navm-box").slideToggle(); 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(45deg)") }else{ $(this).parent().find("dl").hide(500); $(this).css("transform","rotate(0deg)") } }); //搜索框弹出 $('.search').click(function(){ $('.search_wrap').fadeIn(); if($('.search').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: '.banner .swiper-pagination', clickable: true, } }); //鼠标覆盖停止自动切换 mySwiper.el.onmouseover = function(){ mySwiper.autoplay.stop(); } //鼠标离开开始自动切换 mySwiper.el.onmouseout = function(){ mySwiper.autoplay.start(); } //学院新闻 var swiper3 = new Swiper('.palist .swiper-container', { speed:1200, loop:true, spaceBetween: 10, autoplay: { delay: 3000, disableOnInteraction: false, }, navigation: { nextEl: '.palist .swiper-button-next', prevEl: '.palist .swiper-button-prev', } }); //通知公告 var swiper1 = new Swiper('.pclist', { slidesPerView: 2, simulateTouch : false, spaceBetween: 30, breakpoints: { 980: { slidesPerView: 3, }, 720: { slidesPerView: 2, }, 420: { slidesPerView: 1, } } }); // 学术动态 var swiper4 = new Swiper('.pbrlist', { slidesPerView: 4, simulateTouch : false, spaceBetween: 10, breakpoints: { 980: { slidesPerView: 3, }, 720: { slidesPerView: 2, }, 420: { slidesPerView: 1, } } }); //热点专题 var swiper2 = new Swiper('.pdalist', { loop:true, slidesPerView: 3, spaceBetween: 10, direction: "vertical", navigation: { nextEl: '.pdal .swiper-button-next', prevEl: '.pdal .swiper-button-prev', }, breakpoints: { 980: { direction: "horizontal", }, 680: { slidesPerView: 2, direction: "horizontal", }, 420: { slidesPerView: 1, direction: "horizontal", } } }); //青春榜样 var swiper1 = new Swiper('.pdarist', { loop:true, slidesPerView: 3, spaceBetween: 16, autoplay: { delay: 3000, disableOnInteraction: false, }, navigation: { nextEl: '.pdar .swiper-button-next', prevEl: '.pdar .swiper-button-prev', }, breakpoints: { 980: { slidesPerView: 2, }, 520: { slidesPerView: 1, }, } }); //快速导航 var swiper1 = new Swiper('.partdb .swiper-container', { loop:true, slidesPerView: 8, spaceBetween: 30, //autoplay: { // delay: 3000, // disableOnInteraction: false, //}, pagination: { el: '.partdb .swiper-pagination', clickable: true, }, navigation: { nextEl: '.pdb-button .swiper-button-next', prevEl: '.pdb-button .swiper-button-prev', }, breakpoints: { 880: { slidesPerView: 6, }, 720: { slidesPerView: 5, }, 660: { slidesPerView: 4, }, 480: { slidesPerView: 3, }, 400: { slidesPerView: 2, }, } }); //链接下拉 $(".icon-down").click(function(){ $(this).parents(".plink").find(".linklist").slideDown(300); $(this).addClass("on"); }); $(".plink").mouseleave(function(){ $(this).find(".icon-down").removeClass('on'); $(this).find(".linklist").slideUp(); }); //wow var wow = new WOW({ boxClass: 'wow', animateClass: 'animated', offset: 0, mobile: false, live: true }); new WOW().init();