jQuery(document).ready(function($) { if(typeof(Worker) == "undefined"){window.location = "noHtml5.html";} animateImg(); function animateImg(){ new WOW().init(); } //$(".dropdown-menu").addClass("fadeIn").show(); //if($(".m2prou1Bom").size()>0){autoH(".m2prou1Bom");} var hmFocus = new Swiper('.hmFocus .swiper-container', { pagination: '.hmFocus .swiper-pagination', nextButton: '.hmFocus .hmFocusBtnR', prevButton: '.hmFocus .hmFocusBtnL', paginationClickable: true, onlyExternal : false, autoplay: 6000, effect: 'fade', autoplayDisableOnInteraction : false, speed: 1000, spaceBetween: 0, loop: true, onInit: function(swiper){ swiperAnimateCache(swiper); swiperAnimate(swiper); }, onSlideChangeEnd: function(swiper){ swiperAnimate(swiper); } }); $(".mFmBtn").click(function(){ $(".fmLayer,.fmBox").fadeIn(300); }); $(".mCloseBtn").click(function(){ $(".fmLayer,.fmBox").fadeOut(300); }); var hmc2Swiper = new Swiper('.hmc2Swiper .swiper-container', { nextButton: '.hmc2Swiper .next', prevButton: '.hmc2Swiper .prev', slidesPerView: 4, paginationClickable: true, spaceBetween: 28, autoplay:4000, autoplayDisableOnInteraction : false, loop: true, breakpoints: { 767: { slidesPerView: 1, spaceBetweenSlides: 20 }, //当宽度小于等于640 993: { slidesPerView: 2, spaceBetweenSlides: 30 } } }); var hmc4Swiper = new Swiper('.hmc4Swiper .swiper-container', { nextButton: '.hmc4Swiper .next', prevButton: '.hmc4Swiper .prev', slidesPerView: 4, paginationClickable: true, spaceBetween: 28, autoplay:4000, autoplayDisableOnInteraction : false, loop: true, breakpoints: { 767: { slidesPerView: 1, spaceBetweenSlides: 20 }, //当宽度小于等于640 993: { slidesPerView: 2, spaceBetweenSlides: 30 } } }); }); 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(); });