// javascript document $(document).ready(function(e) { /*$("#nowdate").html(function nowdate(){ var d = new date(); var vyear = d.getfullyear(); var vmon = d.getmonth() + 1; var vday = d.getdate(); var week = d.getday(); switch(week){ case 1 : vweek="星期一"; break; case 2 : vweek="星期二"; break; case 3 : vweek="星期三"; break; case 4 : vweek="星期四"; break; case 5 : vweek="星期五"; break; case 6 : vweek="星期六"; break; case 0 : vweek="星期日"; break; } return "今天是:"+vyear+"-"+vmon+"-"+vday+" "+vweek });*/ $("#search").find("input").on("focus",function(){ $(this).val(""); $(this).css("color","#666") }) $("#nav").find("dt").on({ "mouseover":function(){ var len=$(this).find("li").length var liwidth $(this).css("height","45px"); $(this).css("border-bottom-style","solid"); $(this).css("border-bottom-width","3px"); $(this).css("border-bottom-color","red"); if(len>0){ $("#subnav").css("display","block") $(this).find("ul").css("display","block"); $(this).find("ul").css("z-index","99999"); $(this).find("ul").css("width",100*len); //$(this).find("ul").css("left",-(70*len)/4); } }, "mouseleave":function(){ $("#subnav").css("display","none") $(this).find("ul").css("display","none"); $(this).css("height","48px"); $(this).css("border-bottom","none"); } }); /*if($(".right").height()>$(".left").height()){ $(".left").css("height",$(".right").height()) }else{ $(".right").css("height",$(".left").height()) } if($("#indexleft").get()!=""){ $("#nav").find("dt").first().addclass("activenav"); }*/ $(window).scroll(function(){ var isie=!!window.activexobject; var isie6=isie&&!window.xmlhttprequest; if (!isie6){ if($(window).scrolltop()>200){ $("#totop").css("display","block") }else{ $("#totop").css("display","none") } } }) $("#weixin").on("click",function(){ $("#weixincode").toggleclass("hide") }) $("#weixincode").on("click",function(){ $("#weixincode").toggleclass("hide") }) $(window).scroll(function(){ if($(window).scrolltop()>114){ $("#nav").css("position","fixed").css("top","0px").css("left","0px") }else{ $("#nav").css("position","static") } }) });