nolimits4web / swiper

Most modern mobile touch slider with hardware accelerated transitions
https://swiperjs.com
MIT License
39.89k stars 9.74k forks source link

Swiper Callback #1773

Closed anonet1 closed 8 years ago

anonet1 commented 8 years ago

Hello, so I'm trying to on each active slide make my paragraph above visiable. But each paragraph and each slide should be unique. so this is what my js looks like and I need help! This breaks whole slider. var swiper = new Swiper('.swiper-container', { pagination: '.swiper-pagination', effect: 'coverflow', autoplay: 2500, grabCursor: false, centeredSlides: true, slidesPerView: 'auto', loop: true, coverflow: { rotate: 0, stretch: 0, depth: 0, modifier: 1, slideShadows : true }, onSlideChangeStart : function(swiperHere){ titleSwap(); var swiperSlide = swiper.activeSlide() console.log(swiperSlide); } });

function titleSwap(){
   if($(".swiper-slide.first").hasClass("swiper-slide-active")) {
       alert('Show');
   }else{
        alert('Hide');
   }
};
lock[bot] commented 6 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.