$(function(){ $('.news_nav a').click(function(){ $(this).addclass('hover').siblings('a').removeclass('hover'); var nav_id = $(this).data('newskey'); $('[data-newsval="'+nav_id+'"]').show().siblings('.news_container').hide(); }); settimeout(function(){ $('[data-newsval]').find('.news_left').css({'visibility': 'visible', 'animation-name': 'fadeinleft'}); $('[data-newsval]').find('.news_right').css({'visibility': 'visible', 'animation-name': 'fadeinright'}); }, 400); }); $(function(){ $('.case_nav a').click(function(){ $(this).addclass('hover').siblings('a').removeclass('hover'); var nav_id = $(this).data('casekey'); $('[data-caseval="'+nav_id+'"]').show().siblings('.n_case').hide(); }); }); var itlinks ; $(document).ready(function () { hj(); $('.myhex').hover(function () { clearinterval(itlinks); }, function () { if (itlinks) { clearinterval(itlinks); } itlinks = setinterval(shownextlinks2, 3500); }); }); $('.myhex-next').click(function(){ shownextlinks2(false); }); $('.myhex-prev').click(function(){ shownextlinks2(true); }); var swiper = new swiper('.swiper-banner', { pagination: '.banner-pages', nextbutton: '.banner-next', prevbutton: '.banner-prev', paginationclickable: true, spacebetween: 30, centeredslides: true, //loop: true, autoplay: 6500, autoplaydisableoninteraction: false, effect: 'fade', oninit: function (swiper) { //swiper2.x的初始化是onfirstinit swiperanimatecache(swiper); //隐藏动画元素 swiperanimate(swiper); //初始化完成开始动画 }, onslidechangeend: function (swiper) { swiperanimate(swiper); //每个slide切换结束时也运行当前slide动画 }, ontransitionend: function (swiper) { swiperanimate(swiper); }, ontouchend: function (swiper) { swiperanimate(swiper); } }); new swiper('.swiper-clients', { pagination: '.clients_pages', paginationclickable: true, loop: true, autoplay: 3500, spacebetween: 30 }); new swiper('.swiper-solution', { nextbutton: '.solution-next', prevbutton: '.solution-prev', paginationclickable: true, spacebetween: 30, loop: true, }); var swipercase = new swiper('.swiper-case-ul', { speed:300 }); function setcaseindex(index,that){ that.addclass('on'); that.siblings('a').removeclass('on'); swipercase.slideto(index,500); } var notice = new swiper('.swiper-notice', { direction : 'vertical', speed:300, autoplaydisableoninteraction : false, loop : true, autoplay: 4000 }); $('.swiper-notice li').hover(function(){ notice.stopautoplay(); },function(){ notice.startautoplay(); }); var isbegin = false; $(function(){ $(window).scroll(function () { var u = 96; var height = $("#easing").offset().top; var height = $("#easing").height() + 500; if ($(window).scrolltop() >= (height-height) && $(window).scrolltop() <= (height+height)) { if(isbegin) return false; isbegin = true; $(".num1").css('backgroundposition','0 0'); var result = '10'; var num_arr = (result+'').split(''); $(".num1").each(function(index){ var _num = $(this); settimeout(function(){ _num.animate({ backgroundposition: '(0 '+((u*60) - (u*num_arr[index]))+'px)' },{ duration: 5000, easing: "easeinoutcirc" }); }, index * 900); }); $(".num2").css('backgroundposition','0 0'); var result1 = '2000'; var num_arr1 = (result1+'').split(''); $(".num2").each(function(index){ var _num = $(this); settimeout(function(){ _num.animate({ backgroundposition: '(0 '+((u*60) - (u*num_arr1[index]))+'px)' },{ duration: 5000, easing: "easeinoutcirc" }); }, index * 900); }); $(".num3").css('backgroundposition','0 0'); var result2 = '1200'; var num_arr2 = (result2+'').split(''); $(".num3").each(function(index){ var _num = $(this); settimeout(function(){ _num.animate({ backgroundposition: '(0 '+((u*60) - (u*num_arr2[index]))+'px)' },{ duration: 5000, easing: "easeinoutcirc" }); }, index * 900); }); } }); }); skrollr.init({ forceheight: false }); function hj() {}