$(function(){ var swiper = new Swiper(".banner .swiper-container", { autoplay: { delay: 3500, }, speed: 1000, //loop: true, effect: 'fade', navigation: { nextEl: ".banner .swiper-button-next", prevEl: ".banner .swiper-button-prev", }, pagination: { el: ".banner .swiper-pagination", type: "fraction", }, on:{ init: function(){ swiperAnimateCache(this); //隐藏动画元素 swiperAnimate(this); //初始化完成开始动画 }, slideChangeTransitionEnd: function(){ swiperAnimate(this); //每个slide切换结束时也运行当前slide动画 //this.slides.eq(this.activeIndex).find('.ani').removeClass('ani'); 动画只展现一次,去除ani类名 $('.banner .swiper-pagination-total').text($('.banner .swiper-slide').length); } } }); $('.banner .swiper-pagination-total').text('0'+$('.banner .swiper-slide').length); $('.banner .swiper-pagination-current').text('0'+parseInt($('.banner .swiper-slide-active').index()+1)); for( var i=0;i<=$('.banner .swiper-slide').length;i++ ){ var mm = $('.banner .swiper-slide').eq(i).find('.img').children().attr('src'); var kk = 'url(' + mm + ') no-repeat center'; $('.banner .swiper-slide').eq(i).find('.img').css({'background':kk,'background-size':'cover'}); } $(".banner .em2").click(function(){ $(".banner .swiper-button-next").trigger('click'); }); $(".banner .em1").click(function(){ $(".banner .swiper-button-prev").trigger('click'); }); $('.indexnews').height($(window).height()); $('.indexnews').height($(window).height()); $('.indexsert .timeser .li').mouseenter(function(){ $(this).addClass('on').siblings().removeClass('on'); var index = $(this).index(); $('.indexsert .imgker .m').eq(index).addClass('on').siblings().removeClass('on'); }); for( var v=0;v<=$('.indexsert .imgker .m').length;v++ ){ var mmw = $('.indexsert .imgker .m').eq(v).children().attr('src'); var kkw = 'url(' + mmw + ') no-repeat center'; $('.indexsert .imgker .m').eq(v).css({'background':kkw,'background-size':'cover'}); } $('.aboutbanner .img').css({'background':'url(' + $('.aboutbanner .img img').attr('src') + ') no-repeat center','background-size':'cover'}); if( $(window).width() > 750 ){ var swiper = new Swiper(".aboutfour .mySwiper", { slidesPerView: 6, direction: "vertical", freeMode: true, watchSlidesProgress: true, }); var swiper2 = new Swiper(".aboutfour .mySwiper2", { spaceBetween: 10, effect: 'fade', navigation: { nextEl: ".aboutfour .swiper-button-next", prevEl: ".aboutfour .swiper-button-prev", }, thumbs: { swiper: swiper, }, }); } else { var swiper = new Swiper(".aboutfour .mySwiper", { slidesPerView: 4, //direction: "vertical", freeMode: true, watchSlidesProgress: true, }); var swiper2 = new Swiper(".aboutfour .mySwiper2", { spaceBetween: 10, effect: 'fade', navigation: { nextEl: ".aboutfour .swiper-button-next", prevEl: ".aboutfour .swiper-button-prev", }, thumbs: { swiper: swiper, }, }); } $(".aboutfour .cont .left .em1").click(function(){ $(".aboutfour .swiper-button-prev").trigger('click'); }); $(".aboutfour .cont .left .em2").click(function(){ $(".aboutfour .swiper-button-next").trigger('click'); }); var swiper = new Swiper(".newsone .swiper-container", { autoplay: { //delay: 3500,//1秒切换一次 }, speed: 2000, loop: true, navigation: { nextEl: ".newsone .swiper-button-next", prevEl: ".newsone .swiper-button-prev", }, pagination: { el: ".newsone .swiper-pagination", clickable: true }, on:{ init: function(){ swiperAnimateCache(this); //隐藏动画元素 swiperAnimate(this); //初始化完成开始动画 }, slideChangeTransitionEnd: function(){ swiperAnimate(this); //每个slide切换结束时也运行当前slide动画 //this.slides.eq(this.activeIndex).find('.ani').removeClass('ani'); 动画只展现一次,去除ani类名 } } }); $('.servicebanner .img').css({'background':'url(' + $('.servicebanner .img img').attr('src') + ') no-repeat center','background-size':'cover'}); if( $(window).width() > 750 ){ var swiper = new Swiper(".servicetwo .swiper-container", { autoplay: { //delay: 3500,//1秒切换一次 }, speed: 2000, slidesPerView: 6, loop: true, navigation: { nextEl: ".servicetwo .swiper-button-next", prevEl: ".servicetwo .swiper-button-prev", }, pagination: { el: ".servicetwo .swiper-pagination", clickable: true }, on:{ init: function(){ swiperAnimateCache(this); //隐藏动画元素 swiperAnimate(this); //初始化完成开始动画 }, slideChangeTransitionEnd: function(){ swiperAnimate(this); //每个slide切换结束时也运行当前slide动画 //this.slides.eq(this.activeIndex).find('.ani').removeClass('ani'); 动画只展现一次,去除ani类名 } } }); } else { var swiper = new Swiper(".servicetwo .swiper-container", { autoplay: { //delay: 3500,//1秒切换一次 }, speed: 2000, slidesPerView: 3, loop: true, navigation: { nextEl: ".servicetwo .swiper-button-next", prevEl: ".servicetwo .swiper-button-prev", }, pagination: { el: ".servicetwo .swiper-pagination", clickable: true }, on:{ init: function(){ swiperAnimateCache(this); //隐藏动画元素 swiperAnimate(this); //初始化完成开始动画 }, slideChangeTransitionEnd: function(){ swiperAnimate(this); //每个slide切换结束时也运行当前slide动画 //this.slides.eq(this.activeIndex).find('.ani').removeClass('ani'); 动画只展现一次,去除ani类名 } } }); } $('.makebanner .img').css({'background':'url(' + $('.makebanner .img img').attr('src') + ') no-repeat center','background-size':'cover'}); $('.relationbanner .img').css({'background':'url(' + $('.relationbanner .img img').attr('src') + ') no-repeat center','background-size':'cover'}); $('.noticebox .went .top .left .m').click(function(){ $(this).addClass('on').siblings().removeClass('on'); var index = $(this).index(); $('.noticebox .went .kli').eq(index).show().siblings().hide(); }); $(window).scroll(function(){ var scrollTop = document.documentElement.scrollTop || document.body.scrollTop; if(scrollTop > 50){ $('.header').addClass('header2'); $('.cellboxsix .topnav').addClass('topnav2'); }else{ $('.header').removeClass('header2'); $('.cellboxsix .topnav').removeClass('topnav2'); } }); //.indexcapament .list .k for( var x=0;x<=$('.indexcapament .list .li').length;x++ ){ var xx = $('.indexcapament .list .li').eq(x).children('.k').children().attr('src'); var ww = 'url(' + xx + ') no-repeat center'; $('.indexcapament .list .li').eq(x).children('.k').css({'background':ww,'background-size':'cover'}); } if( $(window).width() > 750 ){ $('.indexcapament .list .li').mouseenter(function(){ $(this).css({'width':'7.4rem'}); var ty = ($('.indexcapament .list').width() - $(this).width()) / 2; $(this).siblings().css({'width':ty}); }); $('.indexcapament .list .li').mouseleave(function(){ var yu = $('.indexcapament .list').width() / 3; $('.indexcapament .list .li').css({'width':yu}); }); } $('.newstwo .cont .li .more').click(function(){ if( $(this).text() === '展开更多' ){ $(this).text('关闭更多'); $(this).siblings('.text').children('.bot').addClass('bot2'); } else { $(this).text('展开更多'); $(this).siblings('.text').children('.bot').removeClass('bot2'); } }); $('.companythree .list .more i').click(function(){ if( $(this).text() === '点击加载更多' ){ $('.companythree .list .mk').addClass('mk2'); $(this).text('点击收起更多'); } else { $('.companythree .list .mk').removeClass('mk2'); $(this).text('点击加载更多'); } }); /* $('.cellboxsix .list .tit i').click(function(){ $(this).parent().siblings('.min').slideToggle(); $(this).toggleClass('i'); }); $('.cellboxsix .list .wli .m i').click(function(){ $(this).parent().siblings('.rom').slideToggle(); $(this).toggleClass('i'); }); */ $('.cellboxsix .list .tit').click(function(){ $(this).siblings('.min').slideToggle(); $(this).children('i').toggleClass('i'); }); $('.cellboxsix .list .wli .m').click(function(){ $(this).siblings('.rom').slideToggle(); $(this).children('i').toggleClass('i'); }); $('.caseboxertwo .nav .li').click(function(){ $(this).addClass('on').siblings().removeClass('on'); var index = $(this).index(); $('.caseboxertwo .list .wli').eq(index).addClass('on').siblings().removeClass('on'); }); /*$('.caseboxthree .list').after('
'); $('.caseboxthree .form').html($('.caseboxthree .list').html());*/ for( var rt=1;rt<=$('.caseboxthree .list li:nth-child(4n-3)').length;rt++ ){ $('.caseboxthree .form1 ul').append('