I have added swiper code in [REMOVED].
my code like here
<div class="swiper-container">
<div class="swiper-wrapper">
<!--First Slide-->
<div class="swiper-slide" id="swiper-slide">
<div class="content-slide">
content1
</div>
</div>
</div>
<!--Second Slide-->
<div class="swiper-slide" id="swiper-slide">
<div class="content-slide">
content1
</div>
</div>
</div>
</div>
</div>
They have blank space.
Please see image.
I want to remove this space.
Update:
As passatgt mentioned in the comments for newer versions calculateHeight
is replaced with autoHeight
, here you can find an example:
var swiper = new Swiper('.swiper-container', {
autoHeight: true, //enable auto height
spaceBetween: 20,
pagination: {
el: '.swiper-pagination',
clickable: true,
},
navigation: {
nextEl: '.swiper-button-next',
prevEl: '.swiper-button-prev',
},
});
Add calculateHeight:true
to swiper definition.
var tabsSwiper = new Swiper('.swiper-container',{
speed:300,
calculateHeight:true,
onSlideChangeStart: function(){
$(".tabs li").removeClass('active')
$(".tabs li").eq(tabsSwiper.activeIndex).addClass('active')
}
})
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With