$('body').niceScroll({ cursorcolor: "#ccc", //滚动条的颜色 cursoropacitymax: 1, //滚动条的透明度,从0-1 touchbehavior: false, //使光标拖动滚动像在台式电脑触摸设备 cursorwidth: "8px", //滚动条的宽度 cursorborder: "0", // 游标边框css定义 cursorborderradius: "5px", //以像素为光标边界半径 圆角 autohidemode: false, //是否隐藏滚动条 true的时候默认不显示滚动条,当鼠标经过的时候显示滚动条 zindex: "auto", //给滚动条设置z-index值 railpadding: { top: 0, right: -4, left: 0, bottom: 0 }, //滚动条的位置 }); $('#header-search').axPopup({ url:'#header-search-bar', placement:'auto-bottom', width:400, }); banner1(); function banner1() { var swiper = new Swiper('#pc-banner', { speed: 1500, autoplay: { delay: 3000, stopOnLastSlide: false, disableOnInteraction: true, }, watchOverflow: true, observer: true, observeParents: true, effect: 'fade', on: { init: function () { swiperAnimateCache(this); //隐藏动画元素 swiperAnimate(this); //初始化完成开始动画 }, slideChangeTransitionEnd: function () { swiperAnimate(this); //每个slide切换结束时也运行当前slide动画 //this.slides.eq(this.activeIndex).find('.ani').removeClass('ani'); 动画只展现一次,去除ani类名 } }, pagination: { el: '.swiper-pagination', clickable: true, //type: 'fraction', }, navigation: { nextEl: '.swiper-button-next', prevEl: '.swiper-button-prev', }, }); } $(function () { // $(window).load(function() { // $('#preloader') // .delay(3900) // .slideUp('slow'); // $('body') // .delay(3900) // }); new WOW().init(); $('#foot-close').on('click',function(){ $('.fix-foot').hide() }); /*返回顶部*/ var top = $("#backtop"); $(window).scroll(function () { if ($(window).scrollTop() > 150) { top.slideDown(); } else { top.slideUp(); } let scrollTop = $(window).scrollTop(); let aa = $('header').height(); if (scrollTop > aa) { $('body').addClass('_mini'); } else { $('body').removeClass('_mini'); } }) })