$(function(){ var winH=$(window).height(); var winW=$(window).width(); //首页banner 轮播 var mySwiper = new Swiper('.swiper-container1',{ pagination: '.pagination', autoplay : false,//可选选项,自动滑动 loop : true,//可选选项,开启循环 paginationClickable: true, autoplayDisableOnInteraction:false, speed:500, onSlideChangeStart: function(swiper){ /*$(".product-con-bk05 ul li").find("video").each(function(){ $(this).parents("li").find(".text").removeClass("on"); $(this).get(0).pause(); })*/ } }) /*$(".product-con-bk05 .text").click(function(){ $(this).parents("li").addClass("hover"); if($(this).hasClass("on")){ $(this).removeClass("on"); $(this).parents("li").find("video").get(0).pause(); }else{ $(this).addClass("on"); $(this).parents("li").find("video").get(0).play(); } }) $(".product-con-bk05 .pagination span").click(function(){ $(".product-con-bk05 ul li").find("video").each(function(){ $(this).parents("li").find(".text").removeClass("on"); $(this).get(0).pause(); }) })*/ //为什么选择我们 轮播 var mySwiper2 = new Swiper('.swiper-container2',{ autoplay : false,//可选选项,自动滑动 loop : false,//可选选项,开启循环 autoplayDisableOnInteraction:false, speed:500, spaceBetween:1, slidesPerView:1, navigation: { nextEl: '.swiper-next2', prevEl: '.swiper-prev2', }, breakpoints: { 768: { slidesPerView:3, }, 376: { slidesPerView: 2, } } }) //产品场景应用 certifySwiper = new Swiper('.swiper-container3', { watchSlidesProgress: true, slidesPerView: 'auto', centeredSlides: true, loop: true, loopedSlides:3, autoplay: false, initialSlide :0, navigation: { prevEl: '.swiper-next3', nextEl: '.swiper-prev3', }, 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 = 2; if (Math.abs(slideProgress) > 2) { modify = (Math.abs(slideProgress) - 2) * 0.3 + 2; } translate = slideProgress * modify * this.width*0.56 + 'px'; //console.log($(".join-index-sec02").width()); //console.log(this.width*0.32); scale = 1 - Math.abs(slideProgress) / 2.5; 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) > 3) { slide.css('opacity', 0); } } }, slideChange: function () { //console.log(this.activeIndex); //$(".about-respon-sec03 .text-lb .tab-b").eq(this.realIndex).fadeIn().siblings().hide(); }, setTransition: function(transition) { for (var i = 0; i < this.slides.length; i++) { var slide = this.slides.eq(i) slide.transition(transition); } } } }) $(document).on("click", ".product-con-bk06 .con dd .total", function () { if($(this).hasClass("hover")){ $(this).removeClass("hover"); $(this).text("全部"); $(this).parents("dd").removeClass("on"); }else{ $(this).addClass("hover"); $(this).parents("dd").addClass("on"); $(this).text("收起"); } }) })