//banner var mySwiper1 = new Swiper('.banner', { speed:1200, loop:true, centeredSlides: true, autoplay: { delay: 5000, disableOnInteraction: false, }, navigation: { nextEl: '.banner .swiper-button-next', prevEl: '.banner .swiper-button-prev', } }); //鼠标覆盖停止自动切换 mySwiper1.el.onmouseover = function(){ mySwiper1.autoplay.stop(); } //鼠标离开开始自动切换 mySwiper1.el.onmouseout = function(){ mySwiper1.autoplay.start(); } //二级导航 $(".li_xlz").click(function(){ $(this).parents(".main-left>ul>li").find(".msub").slideToggle(300); $(this).toggleClass("on").siblings().removeClass('on').find(".msub").slideUp(); }) //搜索 $('.search').click(function(){ $('.search_wrap').fadeIn(); }); $('.search_wrap .bck').click(function(){ $('.search_wrap').fadeOut("slow"); });