Answer the question
In order to leave comments, you need to log in
How to make unique buttons (prev, next) for each of 3 Owl-carousel sliders?
For the site, you need to make 3 sliders, I connected and customized them, but the catch was that for each of them you need to make different buttons. There are #slide-one and #slide-two, the following styles are used to customize the buttons of the first one
.owl-prev{
background-image: url("../img/back.png")!important;
background-size: cover;
width: 46px;
height: 46px;
position: absolute;
left: -100px;
bottom: 140px;
}
.owl-next{
background-image: url("../img/next.png")!important;
background-size: cover;
width: 46px;
height: 46px;
position: absolute;
right: -84px;
bottom: 140px;
}
background-image: url("../img/back.png")!important;
background-image: url("../img/back2.png")!important;
Answer the question
In order to leave comments, you need to log in
this slider has an option for button text (or html button code)
for example:
$('.owl-carousel1').owlCarousel({
items: 5,
navText: ['<div class="prev1"></div>','<div class="next1"></div>']
});
$('.owl-carousel2').owlCarousel({
items: 5,
navText: ['<div class="prev2"></div>','<div class="next2"></div>']
});
$('.owl-carousel3').owlCarousel({
items: 5,
navText: ['<div class="prev3"></div>','<div class="next3"></div>']
});
<div class="prev1"></div>
<div class="next1"></div>
<div class="prev2"></div>
<div class="next2"></div>
<div class="prev3"></div>
<div class="next3"></div>
in html like this....
<div style="background-image: url(img/left-chevron.svg)" class="swiper-button-next"></div>
<div class="swiper-button-prev"></div>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question