//焦点图 var swiper2 = new Swiper('.swiper-container-b', { loop: true, speed: 600, pagination: { el: '.swiper-pagination-b', clickable: true, }, autoplay: { delay: 3000, //loop无效 stopOnLastSlide: true, }, }); var galleryThumbs = new Swiper('.gallery-thumbs', { slidesPerView: 2, freeMode: true, watchSlidesVisibility: true, watchSlidesProgress: true, autoplay:{ delay: 3000, }, }); var galleryTop = new Swiper('.gallery-top', { spaceBetween: 10, autoplay:{ delay: 3000, }, thumbs: { swiper: galleryThumbs } }); $(document).ready(function(){ $(".special li").click(function(){ var order = $(".special li").index(this);//获取点击之后返回当前a标签index的值 $(".boxCont" + order).show().siblings("ul").hide();//显示class中con加上返回值所对应的DIV $(this).addClass("active").siblings().removeClass("active"); }); }) var swiper = new Swiper('.swiper-container-v', { slidesPerView:2, centeredSlides: true, loop: true, }); var galleryThumbsZt = new Swiper('.gallery-thumbs-zt', { spaceBetween: 5, slidesPerView: 6, freeMode: true, loopedSlides: 5, //looped slides should be the same watchSlidesVisibility: true, watchSlidesProgress: true, }); var galleryTopZt = new Swiper('.gallery-top-zt', { spaceBetween: 10, loopedSlides: 5, //looped slides should be the same navigation: { nextEl: '.swiper-button-next-zt', prevEl: '.swiper-button-prev-zt', }, thumbs: { swiper: galleryThumbsZt, }, }); //导航 $(document).ready(function(){ $(".navDh").click(function(){ $(".nav").fadeToggle(); }); });