A
A
Alexander Ivanov2016-01-20 12:30:17
JavaScript
Alexander Ivanov, 2016-01-20 12:30:17

How to disable OWL carusel for a certain size and is it possible?

I need it to not work at all for 768, nor substitute its own width, turn off its style, etc.

$('.owl-carousel2').owlCarousel({
        loop: true,
        nav: true,
        dots: false,
        items: 3,
        margin: 3,
        navText: ['туда', 'сюда'],
        responsive:{
          320:{
            items:1,
            nav: true
          },
          480:{
            items:1,
            nav: true
          },
          768:{
            items:6,
            loop: false,
            nav: false,
            mouseDrag: false,
            autoWidth: false,
            callbacks: false,
            navRewind: false,
            dots: false,
            mergeFit: false,
            pullDrag: false,
            slideBy: 0
          },
          800:{
            items:6,
            loop: false,
            nav: false,
            mouseDrag: false,
            autoWidth: false
          },            
          992:{
            items:6,
            loop: false,
            nav: false,
            mouseDrag: false,
            autoWidth: false
          },           
          1025:{
            items:6,
            loop: false,
            nav: false,
            mouseDrag: false,
            autoWidth: false
          },
          1200:{
            items:6,
            loop: false,
            nav: false,
            mouseDrag: false,
            autoWidth: false
          }
        }

Can he pull this off?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
Дмитрий Христоев, 2016-01-20
@cimonlebedev

всмысле вообще? ВООБЩЕ, т.е только до 768, или с 768 до 992 не работал, или что-то еще?

R
Rolros, 2016-12-15
@Rolros

$(window).resize(function() {
if(document.documentElement.clientWidth > 1200) {
// тут ваш скрипт
}
});

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question