//--------------无图图像 var nullimg = '../images/error.png'; function lod(t) { t.onerror = null; t.src = nullimg } $(function () { $(".ratio-img").each(function () { if ($(this).attr("src") == "") { $(this).attr({ "src": nullimg }) } }) }) //end $(function(){ //--------------公用选项卡切换 $(document).on("click", ".tab-box .tab-a", function () { $(this).addClass("on").siblings().removeClass("on"); var ii=$(this).index(); //$.getScript("../javascript/ratio-img.js"); $(this).parents(".tab-box").find(".tab-b").eq(ii).show().siblings().hide(); }) // $(".tab-box").each(function (i) { $(this).find(".tab-a:eq(0)").click(); if($(window).width()<=1024 & isSupportTouch) { $(this).find(".tab-a a").attr({"href":"javascript:;"}) } }); //end $(window).resize(function(){ //--------------手机端banner图片加载 $(".img-load").each(function () { if($(window).width()<768) { $(this).attr({ src: $(this).data("phone-src")}) } else { $(this).attr({ src: $(this).data("src") }) } }) // }) $(window).resize(); }) $(function(){ $(".culture_02 li:odd").addClass("current"); $(".hel_block04 li").eq(0).addClass("on"); $(".hel_block04 li").click(function(){ $(this).addClass("on").siblings().removeClass("on"); }) })