Answer the question
In order to leave comments, you need to log in
Why the script does not work correctly, what is the error?
Hey! Please tell me, it is necessary that when the resolution is less than 900, carousel effects are applied to the elements, and more than 900 so that the carousel does not work. There is a code
jQuery(document).ready(function () {
function mobile() {
var checkWidth = $(window).width();
var demo = $("#carousel-0");
var demo1 = $("#carousel-1");
var demo2 = $("#carousel-2");
if (checkWidth > 901) {
demo.data('owlCarousel').destroy();
demo.removeClass('owl-carousel');
demo1.data('owlCarousel').destroy();
demo1.removeClass('owl-carousel');
demo2.data('owlCarousel').destroy();
demo2.removeClass('owl-carousel');
} else if (checkWidth < 900) {
demo.owlCarousel({
singleItem:true,
navigation : true,
navigationText : ["<",">"],
});
demo1.owlCarousel({
singleItem:true,
navigation : true,
navigationText : ["<",">"],
});
demo2.owlCarousel({
singleItem:true,
navigation : true,
navigationText : ["<",">"],
});
}
}
$(window).resize(mobile);
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question