$(function(){ if($(window).width() > 1004){ var mySwiper1 = new Swiper ('.swiper1', { direction: 'horizontal', loop: true, parallax: true, speed:2000, lazy: { loadPrevNext: true, }, pagination: { el: '.swiper-pagination1', clickable: true, }, navigation: { nextEl: '.swiper-button-next1', prevEl: '.swiper-button-prev1', }, observer:true, observeParents:true, on:{ init:function(){ swiperAnimateCache(this); this.emit('transitionEnd'); }, transitionEnd: function(){ swiperAnimate(this); }, slideChangeTransitionEnd: function () { swiperAnimate(this); //姣忎釜slide鍒囨崲缁撴潫鏃朵篃杩愯褰撳墠slide鍔ㄧ敾 if (this.realIndex != 0) { $('.banner .swiper1 .swiper-slide .box .img').css({ "transform": "scale(1.2)", "transition": "all 10s" }) } else { $('.banner .swiper1 .swiper-slide .box .img').css({ "transform": "scale(1)", "transition": "all 0s" }) } //this.slides.eq(this.activeIndex).find('.ani').removeClass('ani'); 鍔ㄧ敾鍙睍鐜颁竴娆★紝鍘婚櫎ani绫诲悕 }, }, }); } var mySwiper2 = new Swiper ('.swiper2', { direction: 'horizontal', loop: true, observer:true, observeParents:true, speed:800, autoplay : { delay:3000 }, lazy: { loadPrevNext: true, }, // spaceBetween : 30, pagination: { el: '.swiper-pagination2', 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绫诲悕 } } }); var mySwiper4 = new Swiper ('.swiper4', { direction: 'horizontal', loop: true, observer:true, observeParents:true, speed:800, autoplay : { delay:3000 }, lazy: { loadPrevNext: true, }, // spaceBetween : 30, pagination: { el: '.swiper-pagination4', 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绫诲悕 } } }); $('.news .box .tabs .horizontal li').click(function(){ if($(this).data('index') == 1){ // console.log(1) // mySwiper4.detachEvents(); // mySwiper2.attachEvents(); // mySwiper4.autoplay.stop(); // mySwiper2.autoplay.start(); mySwiper2.slideTo(1, 0, true); mySwiper2.autoplay.start(); }else{ // console.log(2) // mySwiper2.detachEvents(); // mySwiper4.attachEvents(); // mySwiper2.autoplay.stop(); mySwiper4.slideTo(0, 0, true); mySwiper4.autoplay.start(); } }) $('.map .research1').hover( function(){ $(this).addClass('active'); new Vivus('my-svg',{ duration: 80, }); }, function(){ $(this).removeClass('active') } ) $('.map .intelligent1').hover( function(){ $(this).addClass('active'); new Vivus('my-svg1',{ duration: 80, }); }, function(){ $(this).removeClass('active') } ) $('.map .serve1').hover( function(){ $(this).addClass('active'); new Vivus('my-svg2',{ duration: 80, }); }, function(){ $(this).removeClass('active') } ) $(window).on('scroll', function() { var oTop = $('.data-box').offset().top, screenScroll = $(window).scrollTop(); if((oTop - screenScroll) < 700){ $('.banner').hide(); $('.m-banner').hide(); }else{ if($(window).width() < 1004){ $('.m-banner').show(); }else{ $('.banner').show(); } } }) var Top = undefined; $('.video-box .play').click(function(){ $('.popups').fadeIn(300); Top = $(window).scrollTop(); $('body').css("top", -Top + "px"); $('body').addClass('fixed'); }) $('.popups .close').click(function(){ $('.popups').fadeOut(300); $('body').removeClass('fixed'); $('body').removeAttr("style"); $(window).scrollTop(Top); document.getElementById("videoShow").pause(); $("div.VideoBtn").stop(false, true).fadeIn({ duration: 380, easing: "easeInQuart" }); }); if($(window).width() > 1004){ $('.accordion .box .digitizing').hover(function(){ $('.digitizing').stop().animate({ 'width':'33%' }, 500, "easeInOutSine"); $('.intelligent').stop().animate({ "width": "23%", "left":"32.9%" }, 500, "easeInOutSine"); $('.globalization').stop().animate({ "width": "23%", "left":"55.3%" }, 500, "easeInOutSine"); $('.green').stop().animate({ "width": "23%", "left":"77.7%" }, 500, "easeInOutSine"); }, function(){ $('.digitizing').stop().animate({ 'width':'25.2%' }, 500, "easeInOutSine"); $('.intelligent').stop().animate({ "width": "25.2%", "left":"25%" }, 500, "easeInOutSine"); $('.globalization').stop().animate({ "width": "25.2%", "left":"50%" }, 500, "easeInOutSine"); $('.green').stop().animate({ "width": "25.2%", "left":"75%" }, 500, "easeInOutSine"); } ) $('.accordion .box .intelligent').hover(function(){ $('.digitizing').stop().animate({ 'width':'23%' }, 500, "easeInOutSine"); $('.intelligent').stop().animate({ "width": "33%", "left":"22.4%" }, 500, "easeInOutSine"); $('.globalization').stop().animate({ "width": "23%", "left":"55.3%" }, 500, "easeInOutSine"); $('.green').stop().animate({ "width": "23%", "left":"77.7%" }, 500, "easeInOutSine"); }, function(){ $('.digitizing').stop().animate({ 'width':'25.2%' }, 500, "easeInOutSine"); $('.intelligent').stop().animate({ "width": "25.2%", "left":"25%" }, 500, "easeInOutSine"); $('.globalization').stop().animate({ "width": "25.2%", "left":"50%" }, 500, "easeInOutSine"); $('.green').stop().animate({ "width": "25.2%", "left":"75%" }, 500, "easeInOutSine"); }) $('.accordion .box .globalization').hover(function(){ $('.digitizing').stop().animate({ 'width':'23%' }, 500, "easeInOutSine"); $('.intelligent').stop().animate({ "width": "23%", "left":"22.4%" }, 500, "easeInOutSine"); $('.globalization').stop().animate({ "width": "33%", "left":"44.8%" }, 500, "easeInOutSine"); $('.green').stop().animate({ "width": "23%", "left":"77.7%" }, 500, "easeInOutSine"); }, function(){ $('.digitizing').stop().animate({ 'width':'25.2%' }, 500, "easeInOutSine"); $('.intelligent').stop().animate({ "width": "25.2%", "left":"25%" }, 500, "easeInOutSine"); $('.globalization').stop().animate({ "width": "25.2%", "left":"50%" }, 500, "easeInOutSine"); $('.green').stop().animate({ "width": "25.2%", "left":"75%" }, 500, "easeInOutSine"); }) $('.accordion .box .green').hover(function(){ $('.digitizing').stop().animate({ 'width':'23%' }, 500, "easeInOutSine"); $('.intelligent').stop().animate({ "width": "23%", "left":"22.4%" }, 500, "easeInOutSine"); $('.globalization').stop().animate({ "width": "23%", "left":"44.8%" }, 500, "easeInOutSine"); $('.green').stop().animate({ "width": "33%", "left":"67.2%" }, 500, "easeInOutSine"); }, function(){ $('.digitizing').stop().animate({ 'width':'25.2%' }, 500, "easeInOutSine"); $('.intelligent').stop().animate({ "width": "25.2%", "left":"25%" }, 500, "easeInOutSine"); $('.globalization').stop().animate({ "width": "25.2%", "left":"50%" }, 500, "easeInOutSine"); $('.green').stop().animate({ "width": "25.2%", "left":"75%" }, 500, "easeInOutSine"); }) } if($(window).width() < 1004){ var mySwiper3 = new Swiper ('.swiper3', { direction: 'horizontal', loop: true, // parallax: true, speed:2000, pagination: { el: '.swiper-pagination3', clickable: true, }, // observer:true, // observeParents:true, // on:{ // init:function(){ // swiperAnimateCache(this); // this.emit('transitionEnd'); // }, // transitionEnd: function(){ // swiperAnimate(this); // }, // } }); } $(window).on('scroll', function() { var item = $('.data-box .box .data .list .item') var oTop = item.offset().top, oHeight = item.innerHeight(), screenScroll = $(window).scrollTop(), screenHeight = $(window).height() if ((screenScroll < oTop + oHeight / 3 * 2) && (screenScroll + screenHeight > oTop + oHeight / 3)){ if($('.item1 .count-title').data('index') == 0){ $('.timer').each(count); $('.item1 .count-title').data('index',1) } } }); // $(window).on('scroll', function() { // var screenScroll = $(document).scrollTop(), // oHeight = $('.video-box').innerHeight(), // vTop = $('.video-box').offset().top; // if ((screenScroll > vTop - oHeight)){ // $(".video-box .video-bg video")[0].play(); // }else{ // $(".video-box .video-bg video")[0].pause(); // } // }) // let iframe = document.createElement('iframe'); // iframe.src="./video/05.mp4"; // var video= $(iframe).find("video"); // //console.log(video.html()) // //video.removeAttr("controls"); // $('.video-box .video-bg').append(iframe); }) $.prototype.initAni = function() { var oTop = this.offset().top, oHeight = this.innerHeight(), screenScroll = $(window).scrollTop(), screenHeight = $(window).height(), that = this; if ((screenScroll < oTop + oHeight / 3 * 2) && (screenScroll + screenHeight > oTop + oHeight / 3)) this.removeClass('init'); $(window).on('scroll', function() { screenScroll = $(window).scrollTop(); screenHeight = $(window).height(); if ((screenScroll < oTop + oHeight / 3 * 2) && (screenScroll + screenHeight > oTop + oHeight / 3)) that.removeClass('init'); }); tabs_takes.init("tabs"); }; $(window).on('load', function() { $('.init:not(.left)').each(function(i, e) { $(e).initAni(); }); }); $(function() { if ($('.left').length != 0) $('.left').initAni(); }) $.prototype.platetitle = function() { var oTop = this.offset().top, oHeight = this.innerHeight(), screenScroll = $(window).scrollTop(), screenHeight = $(window).height(), that = this; if ((screenScroll < oTop + oHeight / 3 * 2) && (screenScroll + screenHeight > oTop + oHeight / 3)) this.removeClass('open'); $(window).on('scroll', function() { screenScroll = $(window).scrollTop(); screenHeight = $(window).height(); if ((screenScroll < oTop + oHeight / 3 * 2) && (screenScroll + screenHeight > oTop + oHeight / 3)) that.removeClass('open'); }); }; $(window).on('load', function() { $('.open:not(.title)').each(function(i, e) { $(e).initAni(); }); $('.open:not(.h1-box)').each(function(i, e) { $(e).initAni(); }); }); $(function() { if ($('.industry .title').length != 0) $('.industry .title').platetitle(); if ($('.data-box .box .title').length != 0) $('.data-box .box .title').platetitle(); if ($('.responsibility .title').length != 0) $('.responsibility .title').platetitle(); if ($('.data-box .box .h1-box').length != 0) $('.data-box .box .h1-box').platetitle(); if ($('.map .h1').length != 0) $('.map .h1').platetitle(); })