Working with swiper js for a slider and want to detect the current image/slide. how i can detect with HTML and JS? any idea?
<div class="swiper-container">
<div class="swiper-wrapper" align="center">
<div class="swiper-slide">
<img src="images/card_gold.png" width="80%" align="middle" onclick="desc(\'' + card1 + '\')">
</div>
<div class="swiper-slide">
<img src="images/card_platinum.png" width="80%" align="middle" onclick="desc(\'' + card2 + '\')">
</div>
<div class="swiper-slide">
<img src="images/card_silver.png" width="80%" align="middle" onclick="desc(\'' + card3 + '\')">
</div>
</div>
<!-- Add Arrows -->
<div class="swiper-button-next"></div>
<div class="swiper-button-prev"></div>
</div>
its very easy. just use this:
swiper.activeIndex