
now the prev button and next button below the carousel. can any setting change the position of buttons?
for example,
likes below image

You could do this using CSS,
.owl-prev,
.owl-next {
position: absolute;
top: 50%;
transform: translateY(-50%);
}
.owl-prev {
left: -2rem;
}
.owl-next {
right: -2rem;
}
You might have to adjust the -2rem as needed. If you are using dots, you might also need to make them absolutely positioned so it doesn't affect the height of the whole carousel and make the prev/next elements not be vertically centred.
Another option is leaving nav: false, creating your desired buttons anywhere you like with html/css, and then setting them up to trigger the previous and next events on the carousel element, like so:
var carouselEl = $('.owl-carousel');
carouselEl.owlCarousel({
items: 6
});
$(".my-next-button").click(function() {
carouselEl.trigger('next.owl.carousel');
});
$(".my-previous-button").click(function() {
carouselEl.trigger('prev.owl.carousel');
});
Seems like this is one is solved.
Another option is leaving
nav: false, creating your desired buttons anywhere you like with html/css, and then setting them up to trigger the previous and next events on the carousel element, like so:var carouselEl = $('.owl-carousel'); carouselEl.owlCarousel({ items: 6 }); $(".my-next-button").click(function() { carouselEl.trigger('next.owl.carousel'); }); $(".my-previous-button").click(function() { carouselEl.trigger('prev.owl.carousel'); });
This works fine for a single carousel, but for multiple carousels, it moves all the carousels.
hi team ,
when i click on next button i skip some slide directly go another slide,
i want track my slide when i click next same on previous option but always go last slide not my flow of previous step of slider.
Most helpful comment
You could do this using CSS,
You might have to adjust the
-2remas needed. If you are using dots, you might also need to make them absolutely positioned so it doesn't affect the height of the whole carousel and make the prev/next elements not be vertically centred.