// javascript document $(function(){ tab($("#tab1")); tab($("#tab2")); tab($("#tab3")); tab($("#tab4")); function tab(objtab){ var oli=objtab.find(".tab_t ul li"); var otabcon=objtab.find(".tab_c1"); oli.click(function(){ var index=oli.index(this); $(this).addclass("on").siblings().removeclass("on"); otabcon.eq(index).show().siblings(".tab_c1").hide(); }) } // $('.go').on('cliarrowupck',function(){ $('html,body').animate({'scrolltop':0},500); }); // $(".menu").click(function(evt){ var e=(evt)?evt:window.event; //判断浏览器的类型,在基于ie内核的浏览器中的使用cancelbubble //在基于firefox内核的浏览器中支持 stoppropagation e.stoppropagation ? e.stoppropagation():e.cancelbubble=true; $(".x-xldsg").toggle(); $(".search_w").hide(); }); $(".search").click(function(evt){ var e=(evt)?evt:window.event; //判断浏览器的类型,在基于ie内核的浏览器中的使用cancelbubble //在基于firefox内核的浏览器中支持 stoppropagation e.stoppropagation ? e.stoppropagation():e.cancelbubble=true; $(".search_w").toggle(); $(".x-xldsg").hide(); }); // $(".prosearch_c").click(function(evt){ var e=(evt)?evt:window.event; //判断浏览器的类型,在基于ie内核的浏览器中的使用cancelbubble //在基于firefox内核的浏览器中支持 stoppropagation e.stoppropagation ? e.stoppropagation():e.cancelbubble=true; if($(".prosearch_c").hasclass("arrowup")){ $(".prosearch_c").addclass("arrowdown").removeclass("arrowup"); $(".prosearch_c1").show(); }else{ $(".prosearch_c").addclass("arrowup").removeclass("arrowdown"); $(".prosearch_c1").hide(); } }); $(".prosearch_c1 ul li").click(function(evt){ var e=(evt)?evt:window.event; //判断浏览器的类型,在基于ie内核的浏览器中的使用cancelbubble //在基于firefox内核的浏览器中支持 stoppropagation e.stoppropagation ? e.stoppropagation():e.cancelbubble=true; var text=$(this).text(); $(this).addclass("on").siblings().removeclass("on"); $(".prosearch_c").text(text); $(".prosearch_c").addclass("arrowup").removeclass("arrowdown"); $(".prosearch_c1").hide(); }) // $("body").on("click",function(e) { $(e.target).attr("class")!="search_w" && $(e.target).attr("class")!="input_text" && $(e.target).attr("class")!="btn_search" && !$(".search_w").is(":hidden")?$(".search_w").hide():""; $(e.target).attr("class")!="menu_con"&& !$(".menu_con").is(":hidden")?$(".menu_con").hide():""; $(e.target).attr("class")!="prosearch_c"&& !$(".prosearch_c1").is(":hidden")?$(".prosearch_c1").hide():""; }); // $(".dongs_img > img[src='']").parent().hide().next("div").css("width","100%"); }) /*隐藏列表*/ $(function(){ $(".x-hsgz .dfg1").click(function(){ if($(this).hasclass("x-hsrt1")){ $(this).removeclass("x-hsrt1"); $(".sdfv1").toggle(); }else{ $(this).addclass("x-hsrt1"); $(".sdfv1").toggle(); } }); }); $(function(){ $(".x-hsgz .dfg2").click(function(){ if($(this).hasclass("x-hsrt1")){ $(this).removeclass("x-hsrt1"); $(".sdfv2").toggle(); }else{ $(this).addclass("x-hsrt1"); $(".sdfv2").toggle(); } }); }); $(function(){ $(".x-hsgz .dfg3").click(function(){ if($(this).hasclass("x-hsrt1")){ $(this).removeclass("x-hsrt1"); $(".sdfv3").toggle(); }else{ $(this).addclass("x-hsrt1"); $(".sdfv3").toggle(); } }); }); $(function(){ $(".x-hsgz .dfg4").click(function(){ if($(this).hasclass("x-hsrt1")){ $(this).removeclass("x-hsrt1"); $(".sdfv4").toggle(); }else{ $(this).addclass("x-hsrt1"); $(".sdfv4").toggle(); } }); }); $(function(){ $(".x-hsgz .dfg5").click(function(){ if($(this).hasclass("x-hsrt1")){ $(this).removeclass("x-hsrt1"); $(".sdfv5").toggle(); }else{ $(this).addclass("x-hsrt1"); $(".sdfv5").toggle(); } }); }); $(function(){ $(".x-hsgz .dfg6").click(function(){ if($(this).hasclass("x-hsrt1")){ $(this).removeclass("x-hsrt1"); $(".sdfv6").toggle(); }else{ $(this).addclass("x-hsrt1"); $(".sdfv6").toggle(); } }); }); $(function(){ $(".x-hsgz .dfg7").click(function(){ if($(this).hasclass("x-hsrt1")){ $(this).removeclass("x-hsrt1"); $(".sdfv7").toggle(); }else{ $(this).addclass("x-hsrt1"); $(".sdfv7").toggle(); } }); }); $(function(){ $(".x-hsgz .dfg8").click(function(){ if($(this).hasclass("x-hsrt1")){ $(this).removeclass("x-hsrt1"); $(".sdfv8").toggle(); }else{ $(this).addclass("x-hsrt1"); $(".sdfv8").toggle(); } }); });