Answer the question
In order to leave comments, you need to log in
How to disable OWL slider on certain sizes?
I used to do now I can not find this option
owlProjects.owlCarousel({
loop: true,
center: false,
nav: false,
navContainerClass: 'owl-navigation',
margin:0,
dots: false,
slideBy:1,
startPosition: 0,
responsive:{
0:{
stagePadding: 50,
margin: 10,
items:1
},
600:{
rewind: false,
callbacks: false
},
}
});
Answer the question
In order to leave comments, you need to log in
Disable in the sense that there would be pictures simply?
$(window).resize(function(){
if($(window).width() > 768){
owlProjects.trigger('destroy.owl.carousel');
}
});
$(window).on('load resize', function () {
if ($(this).width() > 768) {
$(".slider").trigger('destroy.owl.carousel');
} else {
$(".slider").owlCarousel({
items: 2,
});
}
})
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question