jquery(function(){ //选项卡滑动切换通用 jquery(function(){jquery(".hovertag .chgbtn").hover(function(){jquery(this).parent().find(".chgbtn").removeclass("chgcutbtn");jquery(this).addclass("chgcutbtn");var cutnum=jquery(this).parent().find(".chgbtn").index(this);jquery(this).parents(".hovertag").find(".chgcon").hide();jquery(this).parents(".hovertag").find(".chgcon").eq(cutnum).show();})}) //选项卡点击切换通用 jquery(function(){jquery(".clicktag .chgbtn").click(function(){jquery(this).parent().find(".chgbtn").removeclass("chgcutbtn");jquery(this).addclass("chgcutbtn");var cutnum=jquery(this).parent().find(".chgbtn").index(this);jquery(this).parents(".clicktag").find(".chgcon").hide();jquery(this).parents(".clicktag").find(".chgcon").eq(cutnum).show();})}) $(".mct1_itms span").hover(function(){var cutinx1=$(".mct1_itms span").index(this);$(".mct1_itms span").removeclass("cor_blue");$(this).addclass("cor_blue");$(".mc3_wbox").hide();$(".mc3_wbox").eq(cutinx1).show()}); $(".mc3_imgbox").hover(function(){$(this).find(".mc3_line").show();},function(){$(this).find(".mc3_line").hide();}); $(".mbacktop").click(function(){$("body,html").animate({"scrolltop":0},500)}); $(window).scroll(function(){ if($(document).scrolltop()>100){ $(".mbacktop").fadein(300); }else{$(".mbacktop").fadeout(300); } }); //弹出层 $(".mlaybox").height($(document).height()); $(".mreg_click").click(function(){$(".mlayconimg,.mlaybox").fadein(200)}); $(".mlay_close").click(function(){$(".mlayconimg,.mlaybox").fadeout(200)}); }) //屏蔽页面错误 jquery(window).error(function(){ return true; }); jquery("img").error(function(){ $(this).hide(); });