$(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(); })