Hi, I am new to utilizing the Swiper framework and so far, it has been one of the best sliders I have ever experienced. Currently, I am trying to establish a connection between 2 div tags - one tag holds the content of each slide while the other tag controls the function of the slides. My goal is to display the content of the active slide when it is being viewed. Can anyone guide me on how to achieve this?
var swiper = new Swiper(".swiper-container", {
effect: "coverflow",
grabCursor: true,
centeredSlides: true,
slidesPerView: "auto",
coverflowEffect: {
rotate: 20,
stretch: 0,
depth: 350,
modifier: 1,
slideShadows: true
},
pagination: {
el: ".swiper-pagination"
}
});
.items_content-2, .items_content-3 {
display : none;
}
.picture img {
width : 100%;
height : 300px;
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.0.0/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Swiper/3.4.1/js/swiper.min.js"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/Swiper/3.4.1/css/swiper.min.css" rel="stylesheet"/>
<div class="content">
<div class="items_content-1">
Slide-1
</div>
<div class="items_content-2">
Slide-2
</div>
<div class="items_content-3">
Slide-3
</div>
</div>
<div class="swiper-container">
<div class="swiper-wrapper">
<div class="swiper-slide">
<div class="picture one">
<img src="https://source.unsplash.com/random?sig=52" alt="">
</div>
</div>
<div class="swiper-slide">
<div class="picture">
<img src="https://source.unsplash.com/random?sig=24" alt="">
</div>
</div>
<div class="swiper-slide">
<div class="picture">
<img src="https://source.unsplash.com/random?sig=53" alt="">
</div>
</div>
</div>
</div>