//nav var vNavWaitSlide, NavWaitSlide; $('#nav > li').hover( function () { $(this).find('a:first').addClass("hover"); var current_li = $(this), targ = $(current_li).find('ul:first'); NavWaitSlide = setTimeout(function () { if (!$(targ).is(':visible')) { $(targ).slideDown(200); } }, 100) }, function () { clearTimeout(NavWaitSlide); $(this).find('ul').hide(); $(this).find('a:first').removeClass("hover"); } ); //头部点击搜索 $('.soBox').click(function (event) { $('.soBox').addClass('open'); event.stopPropagation(); }); $('body').click(function (event) { $('.soBox').removeClass('open'); event.stopPropagation(); }); //移动端主导航 function mobideMenu() { $(".navHome").click(function () { $(".mobile-inner-nav").slideToggle(250); }); $(".mobile-inner-nav a").each(function (index) { $(this).css({'animation-delay': (index / 20) + 's'}); }); $('.mobile-inner-nav li strong').click(function () { $(this).next('dl').slideToggle(500); $(this).toggleClass('on'); if ($(this).hasClass('on')) { $(this).html("×") } else { $(this).html("+") } }) } //移动端顶部点击弹出下拉菜单 function Menu(menu, main) { $(menu).click(function () { $(this).toggleClass("mobile-inner-header-icon-click mobile-inner-header-icon-out"); $(".sub_navm").slideToggle(250); $('.sub_navm').find('.phone_toggle').click(function () { $(this).next('dl').slideToggle(500); $(this).toggleClass('on'); if ($(this).hasClass('on')) { $(this).html("×") } else { $(this).html("+") } }) }); }; //下拉菜单 例调用:Nav('#nav'); function Nav(id) { var oNav = $(id); var aLi = oNav.find('li'); aLi.hover(function () { $(this).addClass('on'); $(this).find('.subNav').addClass('flipInY'); }, function () { $(this).removeClass('on'); $(this).find('.subNav').removeClass('flipInY'); }) }; //通知公告 jQuery(".noticebox").slide({}); //专题 $('.ztslider').slick({ autoplay: true, dots: false, infinite: true, speed: 600, slidesToShow: 3, slidesToScroll: 1, responsive: [ { breakpoint: 1024, settings: { slidesToShow: 2, slidesToScroll: 2, infinite: true, dots: false } }, { breakpoint: 768, settings: { slidesToShow: 2, slidesToScroll: 1 } }, { breakpoint: 480, settings: { slidesToShow: 1, slidesToScroll: 1 } } // You can unslick at a given breakpoint now by adding: // settings: "unslick" // instead of a settings object ] }); //banner $('.ibanner').slick({ autoplay: true, arrows: true, dots: true, fade: true, infinite: true, speed: 600, autoplaySpeed: 4000, cssEase: 'linear' }); //通知切换 jQuery(".noticnrbox").slide(); //基层动态 $('.jcnews_pic').slick({ autoplay: true, arrows: true, dots: true, infinite: true, speed: 500, cssEase: 'linear' }); //边框 (function ($) { $.fn.num1 = function () { n1 = $(this).width(); h1 = $(this).height(); $(this).hover(function () { var becurr = "background:#007472;position:absolute;" // top边框 var divTop = "
"; // right边框 var divRight = "
"; // Bottom边框 var divBottom = "
"; // Left边框 var divLeft = "
"; $(this).append(divTop, divRight, divBottom, divLeft); $(this).find("div:nth-child(odd)").stop().animate({width: n1 + 1}, 300); $(this).find("div:nth-child(even)").stop().animate({height: h1 + 1}, 300); }, function () { $(this).find("div:nth-child(odd)").stop().animate({width: 0}, 300); $(this).find("div:nth-child(even)").stop().animate({height: 0}, 300); }) } })(jQuery); //二维码 $(".footer_right a").mouseenter(function () { $(this).next("div").slideDown(500); }); $(".footer_right a").mouseleave(function () { $(this).next("div").slideUp(500); }); //新媒体 $("#gztit,#gztit1").click(function(){ $(".rwmimg").toggle(); }); //元素的动画效果 AOS.init({ offset: 100, duration: 500, easing: 'ease-in-sine', delay: 100, }); //小屏幕设备中禁用AOS AOS.init({ disable: 'mobile' });