jQuery(document).ready(function($) { if(typeof(Worker) == "undefined"){ $("body").addClass("ieBody"); }else{ animateImg(); function animateImg(){ new WOW().init(); } } //$(".dropdown-menu").addClass("fadeInDown").show(); //if($(".m2prou1Bom").size()>0){autoH(".m2prou1Bom");} $('.hmCon1').slick({ autoplay: true, arrows: false, dots:true, infinite: true, speed: 500, autoplaySpeed: 5000, pauseOnHover: false, //fade: true, }); $('.hmCon1').init(function(slick){ $('.hmCon1 .hmBan.slick-current').addClass('active').siblings().removeClass('active') }) $('.hmCon1').on('afterChange',function(slick,currentSlide){ $('.hmCon1 .hmBan.slick-current').addClass('active').siblings().removeClass('active'); }) //图片背景方式展示 if($(".bgImg").size()>0){ $(".bgImg").each(function(i){$(".bgImg").eq(i).css("background-image","url("+$(this).find("img").attr("src")+")")}); } }); function picTxtHeight() { $(".picTxtBox").each(function(i){if($(this).find(".txtBox").height()>$(this).find(".picBox").height()){$(this).height($(this).find(".txtBox").height());}else{$(this).height($(this).find(".picBox").height());}$(this).find(".picBox-wp,.txtBox-wp").css("min-height",$(this).height())})} if($(document).width()>767){ picTxtHeight(); } $(window).resize(function(){ if($(document).width()>767){ picTxtHeight(); } }) function autoH(className){ var maxH = 0; $(className).each(function() { var cutH = $(this).innerHeight(); if(cutH>maxH){ maxH = cutH; } }); $(className).innerHeight(maxH); } //屏蔽页面错误 jQuery(window).error(function(){ return true; }); jQuery("img").error(function(){ $(this).hide(); });