var open = false; $(function () { $(".nav-menu > li").hover(function() { var $container = $(this), $list = $container.find(".sub-nav"); $list.slideDown(500); }, function() { var $el = $(this); $el.find(".sub-nav") .hide() .end(); }); if($(".smallbanner-nav li").length >0) { $(".smallbanner-nav").show(); } $(".header-logo .header-arrow").on("click",function(){ $(".header-nav").slideToggle(250); }); $("body,html").click(function(){ $(".searchbox").animate({"width":"45px"}); $(".searchbtn").stop(true,true).fadeIn(); }); $(".searchbtn").click(function(){ $(this).stop(true,true).fadeOut(); $(".searchbox").stop(true,true).animate({"width":"200px"}); return false; }); $(".search-input").click(function(){ return false; }); $(".search-submit").click(function(event) { //$(this).removeAttr("name"); //event.preventDefault(); var val = $.trim($(".search-title").val()); if(val!==""){ return true; }else{ alert("请输入关键词"); return false; } }); $(".ksrk_nei_li").mouseenter(function(){ $(this).addClass("asect").find(".select_content_r").show(); }).mouseleave(function () { $(this).removeClass("asect").find(".select_content_r").hide(); }); $('.cn-button').click(function(e){ e.stopPropagation(); if(!open){ openNav(); } else{ closeNav(); } }); $('.cn-btn-close').click(function(e){ e.stopPropagation(); closeNav(); }); $('.cn-wrapper').click(function(e){ e.stopPropagation(); }); $(document).click(function(){closeNav();}) }); function setTabs($div) { var $div_info = $("."+$div+" .index-subtitle .tab-title li"); $div_info.on("click",function(){ $(this).addClass("cur").siblings().removeClass("cur"); var index = $div_info.index(this); $("."+$div+" ."+$div+"-cons ."+$div+"-con").eq(index).show().siblings().hide(); }); } function setTabs1($div) { var $div_info = $("."+$div+" .index-title-tab li"); $div_info.on("click",function(){ $(this).addClass("cur").siblings().removeClass("cur"); var index = $div_info.index(this); $("."+$div+" .cons .con").eq(index).show().siblings().hide(); }); } function openNav(){ open = true; $('.cn-button').hide(); $('.cn-wrapper').addClass('opened-nav'); } function closeNav(){ open = false; $('.cn-button').show(); $('.cn-wrapper').removeClass('opened-nav'); } $(function () { $('.page-news-con #vsb_newscontent').parent().find('p,span').each(function(item){ this.removeAttribute('style'); }); $('.page-news-con iimg').each(function(){ let html = $(this).parent().html(); html = html.replace(/