$(function(){ var swiper = new Swiper('.hmProSwiper', { slidesPerView: 2, noSwiping : true, navigation: { nextEl: '.hmProNext', prevEl: '.hmProPrev', }, }); // var hmProSliul = new Swiper('.hmProSliul', { slidesPerView: 1, effect: 'fade', direction: 'vertical' }); var hmProText = new Swiper('.hmProText', { slidesPerView: 1, direction: 'vertical' }); $(".hmProNav li").click(function(){ var _this = $(this); var _thisIndex = _this.index(); _this.addClass("active"); _this.siblings("li").removeClass("active"); $(".hmPro_pg li").removeClass("active"); $(".hmPro_pg li").eq(_thisIndex).addClass("active"); hmProSliul.slideTo(_thisIndex, 1000); hmProText.slideTo(_thisIndex, 0); }) // var swiper = new Swiper('.hmNewsList', { loop: true, slidesPerView: 'auto', navigation: { nextEl: '.hmNewsPrev', prevEl: '.hmNewsNext', }, }); })