jquery(function() { var max = jquery(".banner .bwitem").length; var $banner = jquery(".banner-wrap"), $banneritem = $banner.find(".bwitem"); $bannerimg = jquery(".banner .bwitem .pimg"); $head_top = $(".header").height(); $('.banner').on('init', function(event, slick, currentslide, nextslide) { $(".bwitem").first().addclass("show"); }); jquery(".banner").slick({ slide: ".bwitem", autoplay: true, arrows: true, dots: true, infinite: true, easing: "easeinoutexpo", speed: 600, autoplayspeed: 4000, pauseonhover: false, fade: true }).on({ 'beforechange': function(event, slick, currentslide, nextslide) { var _item = $(this).find(".bwitem"); _item.eq(nextslide).addclass("show").siblings().removeclass("show"); } }); settimeout(function() { $banner.find(".bwitem").eq(0).addclass("show"); }, 1); function initbanner() { if(!ismobile) { $banner.css({ height: win_height - $head_top }); $banneritem.css({ height: win_height - $head_top }); pageinit.setimgmax($bannerimg, 1920, 839, win_width, win_height - $head_top); } else { $banner.css({ height: "auto" }); $banneritem.css({ height: "auto" }); $bannerimg.attr("style", "").css({ position: "relative" }); } } initbanner(); // 产品中心 jquery(".iplist").slick({ slidestoshow: 4, slidestoscroll: 1, centerpadding: '0', arrows: true, speed: 600, autoplayspeed: 3500, dots: false, infinite: true, centermode: false, autoplay: true, focusonselect: true, responsive: [{ breakpoint: 1200, settings: { slidestoshow: 2, slidestoscroll: 1, } }, { breakpoint: 480, settings: { slidestoshow: 1, slidestoscroll: 1, } } ] }); // 新闻中心 jquery(".ixbanner").slick({ slidestoshow: 1, slidestoscroll: 1, centerpadding: '0', arrows: true, speed: 600, autoplayspeed: 3500, dots: false, infinite: true, centermode: false, autoplay: true, focusonselect: true }); });