In this post, I would like to discuss a certain behavior of OwlCarousel I noticed with respect to the ‘responsive’ option of the plugin.
The below code snippet doesn’t output one single column on mobile devices if there is only one post/item to display.
responsiveClass:true,
responsive:{
0:{
items:1,
},
768:{
items:echo number of columns,
}
}
Instead, a slight change to the script as shown below works perfectly fine.
responsiveClass:true,
responsive:{
0:{
items:1.0000000000001,
},
768:{
items:echo number of columns,
}
}
Please leave a comment if you faced similar issue and what kind of resolution you came up with.
WordPress and Owl Carousel
Leave a reply