}, step: function (a, b) { $(this).html(parseInt(b.pos * opts.lastNumber)); } }); } $(function () { $("#about_year").numberRock({ lastNumber: 10, duration: 2000, easing: 'swing', //慢快慢 }); $("#about_num").numberRock({ lastNumber: 100, duration: 2000, easing: 'swing', //慢快慢 }); $("#about_numer").numberRock({ lastNumber: 10, duration: 2000, easing: 'swing', //慢快慢 }); $('.about_content4 .list .item').on('click', function () { var name = $(this).find('.name').eq(0).html(); var position = $(this).find('.position').eq(0).html(); var desc = $(this).find('.desc').eq(0).html(); $('.about_content4 .content .name').html(name); $('.about_content4 .content .position').html(position); $('.about_content4 .content .desc').html(desc); }); }); var swiperIndex = 0; // 当前下标 window.onload = function () { // 电脑端轮播图实例 var carousel = $("#carousel").waterwheelCarousel({ flankingItems: 1, separation: 300, opacityMultiplier: 1, autoPlay: 0 }); // 电脑端左右操作 $('#carousel .next').on('click', function () { if (Number(swiperIndex) === $('#carousel .img').length - 1) { return }; carousel.ddd(1); }); $('#carousel .prev').on('click', function () { carousel.ddd(-1); }); // 图片加载完后显示轮播图,优化显示效果 $('#carousel').addClass('active'); } // 移动端轮播图实例 var swiper = new Swiper('.swiper-container', { pagination: '.swiper-pagination', slidesPerView: 'auto', paginationClickable: true, spaceBetween: 0 });