$(function () { //轮播图 // var swiper1 = new swiper(".swiper1", { // loop: false, // grabcursor: true, // speed: 600, // spacebetween: 0, // observer: true, // observeparents: true, // navigation: { // nextel: ".next1", // prevel: ".prev1", // }, // pagination: { // el: '.one', // type: 'progressbar' // }, // lazy: { // loadprevnext: true, // }, // on: { // init: function () { // swiperanimatecache(this); //隐藏动画元素 // swiperanimate(this); //初始化完成开始动画 // }, // slidechangetransitionend: function () { // swiperanimate(this); //每个slide切换结束时也运行当前slide动画 // } // } // }); var lis = $('.case-content li'); lis.on('click', function () { let $this = $(this); $this.addclass('active'); $this.siblings().removeclass('active'); }) //数字++ $(window).on('scroll', function () { var otop = $('.nums').offset().top, oheight = $('.nums').innerheight(), screenscroll = $(window).scrolltop(), screenheight = $(window).height(); if (($('.timer').text() == "") && (screenscroll < otop + oheight / 3 * 2) && (screenscroll + screenheight > otop + oheight / 3)) { $('.timer').each(count); } }) })