$(function () { var bannerSwiper = new Swiper(".banner .swiper-container", { autoplay: {delay: 8000, disableOnInteraction: false}, speed: 1000, watchSlidesProgress: true, effect: 'fade', fadeEffect: {crossFade: true}, simulateTouch: false, pagination: { el: '.banner-page', clickable: true, renderBullet: function (index, className) { return '

'; } } }); $(".pro-cate .pa").hover(function () { $(this).addClass("on").siblings().removeClass("on"); $(".pro-box .pro-list").eq($(this).index()).addClass("on").siblings().removeClass("on"); }); $('.industry-slider').slick({ autoplay: true, autoplaySpeed: 6000, pauseOnHover: true, slidesToShow: 4, slidesToScroll: 1, infinite: true, arrows: false, speed: 600, cssEase: 'linear', responsive: [ { breakpoint: 1025, settings: { slidesToShow: 3 } }, { breakpoint: 769, settings: { slidesToShow: 2 } }, { breakpoint: 767, settings: { slidesToShow: 1, } } ] }); $(window).scroll(function () { if ($('.industry-slider').offset().top > $(window).scrollTop() + 200) { $('.industry-slider').slick('slickPlay'); } }); $('.industry .prev').click(function () { $('.industry-slider').slick('slickPrev') }) $('.industry .next').click(function () { $('.industry-slider').slick('slickNext'); }); if ($(".bgImg").length > 0) { $(".bgImg").each(function (i) { $(".bgImg").eq(i).css("background-image", "url(" + $(this).find("img").attr("src") + ")") }); } $('.counter').countUp(); var newSwiper = new Swiper('.swiper-news', { spaceBetween: 38, slidesPerView: 3, pagination: { el: '.news-pagination', clickable: true, }, breakpoints: { 1024: { slidesPerView: 2, }, 767: { slidesPerView: 1, } }, }); var mySwiper_zz = new Swiper('.honor-li', { watchSlidesProgress: true, slidesPerView: 5.6, centeredSlides: true, loop: true, loopedSlides: 11, autoplay: false, navigation: { nextEl: '.swiper-button-next', prevEl: '.swiper-button-prev', }, pagination: { el: '.swiper-pagination', }, on: { progress: function (progress) { for (i = 0; i < this.slides.length; i++) { var slide = this.slides.eq(i); var slideProgress = this.slides[i].progress; modify = 1; if (Math.abs(slideProgress) > 1) { modify = (Math.abs(slideProgress) - 1) * 0.5 + 1; } translate = slideProgress * modify * 15.8 + '%'; scale = 1 - Math.abs(slideProgress) * 0.06; zIndex = 999 - Math.abs(Math.round(10 * slideProgress)); slide.transform('translateX(' + translate + ') scale(' + scale + ')'); slide.css('zIndex', zIndex); slide.css('opacity', 1); if (Math.abs(slideProgress) > 5) { slide.css('opacity', 0); } } }, setTransition: function (transition) { for (var i = 0; i < this.slides.length; i++) { var slide = this.slides.eq(i) slide.transition(transition); } } }, breakpoints: { 1229: { slidesPerView: 3.8, }, 667: { slidesPerView: 2.6, }, }, }); })