How to Add margin to Owl Carousel items through jQuery
If you want to dynamically add margin to Owl Carousel items using jQuery, you can do so after the carousel has been initialized.
$(document).ready(function() {
// Initialize Owl Carousel
$("#MakSlidersaasas").owlCarousel({
items: 8,
itemsDesktop: [1920, 7],
itemsDesktopSmall: [980, 4],
itemsMobile: [600, 3],
navigation: true,
navigationText: ["", ""],
pagination: true,
autoPlay: false
});
Here MakSlidersaasas is Your Owl Carousel id.
we use the .css()
method to add margin to Owl Carousel items.
$("#MakSlidersaasas .owl-item").css("margin-right", "20px"); // Adjust the margin value as needed
});