$(function() { var wow = new WOW({ boxClass: 'wow', mobile: false }); wow.init(); $(".sear-bar").find("form").submit(function() { var val = $(this).find(".keyword").val(); if (!val) { alert("请输入关键字"); return false; } }); $(".menu-btn").on("click", function() { $(".header").find(".nav").toggle(); }); //$(".sc-btn").on("click", function() { // $(".header").find(".sc-form").toggle(); //}); if ($(window).width() > 767) { $(".dropdown").hover(function() { $(this).addClass("open"); }, function() { $(this).removeClass("open"); }); var Sticky = new hcSticky('.header', { top:0, stickTo: 'body' }); } else { $(".dropdown").find(".arr").on("click", function() { $(this).parent().toggleClass("open"); }); var Sticky = new hcSticky('.header', { top:0, stickTo: 'body' }); var Sticky1 = new hcSticky('.footer-fix', { bottom:0, stickTo: 'body' }); } //$(".nav").find(".arr").on("click", function() { // $(this).parent().toggleClass("open"); //}); $(".footer").find("dt").on("click", function() { if ($(this).parent().hasClass("open")) { $(this).parent().removeClass("open"); $(this).next().slideUp(); } else { $(this).parent().addClass("open"); $(this).next().slideDown(); } }); $(window).resize(function (){      location.reload()      //这里你可以写你的刷新代码! }); }); //产品tab+swiper function tabsSwiper(menu, con) { var swiper = new Swiper(con, { speed:500, spaceBetween:10, on:{ slideChangeTransitionStart:function() { $(menu).find("li").eq(this.activeIndex).addClass("active").siblings().removeClass("active"); } } }); $(menu).on("click", "li", function(e) { $(this).addClass("active").siblings().removeClass("active"); swiper.slideTo($(this).index()); }); }