$(function(){ $(".weixin").click(function () { $(".tan-box").show(); $("#zhezhao").show(); }); $(".close02").click(function () { $(".tan-box").hide(); $("#zhezhao").hide(); }); $(".china .zw").click(function () { $(".menu-button .china .lan-yy").toggleclass("show"); }); }) $(function () { var wow = new wow({ boxclass: 'wow', animateclass: 'animated', offset: 100, mobile: false, live: true }); wow.init(); }) var popup = $(".polit-popup-fixed"); var popup_timers = settimeout(function () { popup.animate({"left": 15}, 800) }, 10000); $('.wx-open-div .div-img').click(function () { $(".wx-open-div").fadeout(300, function () { popup.animate({"left": 15}, 800); }) }); $(".wx-open-div .close").on("click", function () { $(".wx-open-div").fadeout(); }); $(".polit-popup-fixed .close").on("click", function () { popup.animate({"left": -470}, 800, function () { $('.wx-open-div').fadein(); }); cleartimeout(popup_timers); }); function gotop(){ $('html,body').animate({'scrolltop':0},600); //滚回顶部的时间,越小滚的速度越快~ }; $('.scroll-btn').click(function() { $('html,body').animate({ scrolltop: $("#part1").offset().top}, 600) }); $(function () { $(".menu-wrapper>div.dan").click(function(){ $(this).addclass("menu-active"); $(this).siblings(".dan").removeclass("menu-active"); $(this).siblings(".dan").children("a").removeclass(); $(this).siblings(".dan").children("a").addclass("icon-plus");//给同胞元素的子元素a加上plus符号 $(this).children("a").removeclass();//给自身子元素减去符号 $(this).children("a").addclass("icon-minus");//给自身子元素a加上minus符号 }); $(".menu-button .btn").click(function(){ $(this).toggleclass("is-active"); $(".menu-wrapper").toggleclass("close-menu"); }); $(".menu-bar>li>.icon-search").click(function(){ $(".navigation").addclass("is-hide"); $(".navigation-wrapper>.search-wrapper").addclass("is-active"); $(".search-mask").remove(); $(".navigation-wrapper>.search-wrapper").before('
'); $(".search-mask").click(function(){ $(".navigation-wrapper>.search-wrapper").removeclass("is-active"); $(this).remove(); $(".navigation").removeclass("is-hide"); }); }); }); $(document).ready(function(){ var $tab_li = $('.tabs01 a'); $tab_li.hover(function(){ $(this).addclass('on').siblings().removeclass('on'); var index = $tab_li.index(this); $('.tab-con01 .group').eq(index).show().siblings().hide(); }); var $tab_li2= $('.tabs02 a'); $tab_li2.hover(function(){ $(this).addclass('cur').siblings().removeclass('cur'); var index = $tab_li2.index(this); $('.tab-con02 .items').eq(index).show().siblings().hide(); }); var $tab_li3= $('.tab03 a'); $tab_li3.hover(function(){ $(this).addclass('on2').siblings().removeclass('on2'); var index = $tab_li3.index(this); $('.tab-con03 .team').eq(index).show().siblings().hide(); }); }); $(document).scroll(function() { var scrtop = $(window).scrolltop(); if(scrtop > 120) { $('.header').css('position','fixed'); } else { $('.header').css('position','relative'); } }); var swiper = new swiper('.swiper-container', { navigation: { nextel: '.swiper-button-next', prevel: '.swiper-button-prev', }, pagination: { el: ".swiper-pagination", clickable: true, }, speed:1200, autoplay: 10000, autoplaydisableoninteraction: false, loop: true }); var swiper = new swiper('.myswiper', { slidesperview: 2, spacebetween: 0, autoplay:true, speed:1000, navigation: { nextel: '.swiper-button-next', prevel: '.swiper-button-prev', }, pagination: { el: ".swiper-pagination", clickable: true, }, breakpoints: { 500: { slidesperview: 2, spacebetween: 0, }, 650: { slidesperview: 2, spacebetween: 0, }, 768: { slidesperview: 2, spacebetween: 0, }, 1024: { slidesperview: 5, spacebetween: 0, }, } }); var swiper = new swiper('.myswiper4', { slidesperview: 1, spacebetween: 0, autoplay:false, speed:1000, navigation: { nextel: '.swiper-button-next', prevel: '.swiper-button-prev', }, }); var swiper = new swiper(".myswiper01", { spacebetween: 10, slidesperview: 4, freemode: true, watchslidesprogress: true, }); var swiper2 = new swiper(".myswiper02", { spacebetween: 10, navigation: { nextel: ".swiper-button-next", prevel: ".swiper-button-prev", }, thumbs: { swiper: swiper, }, }); var swiper = new swiper(".myswiper-1", { direction: "vertical", slidesperview: "auto", freemode: true, scrollbar: { el: ".swiper-scrollbar", }, mousewheel: true, }); var swiper = new swiper(".myswiper-2", { direction: "vertical", slidesperview: "auto", freemode: true, scrollbar: { el: ".swiper-scrollbar", }, mousewheel: true, }); var swiper = new swiper(".myswiper-3", { direction: "vertical", slidesperview: "auto", freemode: true, scrollbar: { el: ".swiper-scrollbar", }, mousewheel: true, }); var swiper = new swiper(".myswiper001", { spacebetween: 0, slidesperview: 1, freemode: true, watchslidesprogress: true, navigation: { nextel: ".swiper-button-next", prevel: ".swiper-button-prev", }, breakpoints: { 500: { slidesperview: 1, spacebetween: 0, }, 650: { slidesperview: 1, spacebetween: 0, }, 768: { slidesperview: 1, spacebetween: 0, }, 1024: { slidesperview: 5, spacebetween: 0, }, } }); var swiper2 = new swiper(".myswiper002", { spacebetween: 0, thumbs: { swiper: swiper, }, }); var swiper = new swiper('.common-solu', { slidesperview: 4, spacebetween: 30, navigation: { nextel: '.swiper-button-next', prevel: '.swiper-button-prev', }, pagination: { el: ".swiper-pagination", clickable: true, }, speed:1200, autoplay: 10000, autoplaydisableoninteraction: false, loop: true }); //窗口显示才加载 var wraptop = $(".about1").offset().top; var istrue = true; $(window).on("scroll", function() { var s = $(window).scrolltop(); if (s > wraptop - 0 && istrue) { $(".timer").each(count); function count(a) { var b = $(this); a = $.extend({}, a || {}, b.data("counttooptions") || {}); b.countto(a) }; istrue = false; }; }) //设置计数 $.fn.countto = function (options) { options = options || {}; return $(this).each(function () { //当前元素的选项 var settings = $.extend({}, $.fn.countto.defaults, { from: $(this).data('from'), to: $(this).data('to'), speed: $(this).data('speed'), refreshinterval: $(this).data('refresh-interval'), decimals: $(this).data('decimals') }, options); //更新值 var loops = math.ceil(settings.speed / settings.refreshinterval), increment = (settings.to - settings.from) / loops; //更改应用和变量 var self = this, $self = $(this), loopcount = 0, value = settings.from, data = $self.data('countto') || {}; $self.data('countto', data); //如果有间断,找到并清除 if (data.interval) { clearinterval(data.interval); }; data.interval = setinterval(updatetimer, settings.refreshinterval); //初始化起始值 render(value); function updatetimer() { value += increment; loopcount++; render(value); if (typeof(settings.onupdate) == 'function') { settings.onupdate.call(self, value); } if (loopcount >= loops) { //移出间隔 $self.removedata('countto'); clearinterval(data.interval); value = settings.to; if (typeof(settings.oncomplete) == 'function') { settings.oncomplete.call(self, value); } } } function render(value) { var formattedvalue = settings.formatter.call(self, value, settings); $self.html(formattedvalue); } }); }; $.fn.countto.defaults={ from:0, //数字开始的值 to:0, //数字结束的值 speed:1000, //设置步长的时间 refreshinterval:100, //隔间值 //decimals:0,显示小位数 formatter: formatter, //渲染之前格式化 onupdate:null, //每次更新前的回调方法 oncomplete:null //完成更新的回调方法 }; function formatter(value, settings){ return value.tofixed(settings.decimals); } //自定义格式 $('#count-number').data('counttooptions',{ formmatter:function(value, options){ return value.tofixed(options.decimals).replace(/\b(?=(?:\d{3})+(?!\d))/g, ','); } }); //定时器 $('.timer').each(count); function count(options){ var $this=$(this); options=$.extend({}, options||{}, $this.data('counttooptions')||{}); $this.countto(options); }