Currently facing an issue with Swiper Slider and Simple Parallax Scrolling. Whenever I switch slides, the same image is displayed repeatedly.
I suspect the problem lies in the fixed position of the image within the parallax effect.
Attempted to resolve by adding a z-index for .swiper-slide-active, but unfortunately, it did not yield any positive results.
HTML structure:
<div class="top-slider swiper-container w-100 fl">
<div class="swiper-wrapper">
<div class="slide-item swiper-slide" data-parallax="scroll" data-image-src="img/top_slide_01.jpg">
</div>
<div class="slide-item swiper-slide" data-parallax="scroll" data-image-src="img/top_slide_02.jpg">
</div>
</div>
</div>
Javascript snippet:
// Implementing Top slider functionality
var topSlider = new Swiper('.top-slider', {
loop: true,
slidesPerView: 1,
effect: 'fade'
});
Seeking guidance on how to tackle this particular challenge effectively.
Alternatively, are there different approaches to achieve parallax scrolling?