@Artdomhouse

Как в OWL слайдере добавить параметры?

Есть код слайдера owl, как правильно в этот код добавить такие параметры
loop: true,
autoplay: true,
autoplayTimeout: 3000,
autoplayHoverPause: true,


$(".gp-more-goods .gcarousel .goods-list").each(function() {
        var carousel = $(this),         
            prev = $(this).parent().parent().parent().find('.gcarouselarrow.prev'),
            next = $(this).parent().parent().parent().find('.gcarouselarrow.next');
        $(this).owlCarousel({
            items: 4,
            itemsDesktop: [1647, 4],
            itemsDesktopSmall: [1268, 4],
            itemsTablet: [991, 3],
            itemsTabletSmall: [780, 2],
            itemsMobile: [567, 2]
        });
        prev.click(function() {
            carousel.trigger('owl.prev');
        });
        next.click(function() {
            carousel.trigger('owl.next');
        });
    });
});
  • Вопрос задан
  • 29 просмотров
Пригласить эксперта
Ответы на вопрос 1
mrsexy
@mrsexy
Senior Pomidor
$(".gp-more-goods .gcarousel .goods-list").each(function() {
        var carousel = $(this),         
            prev = $(this).parent().parent().parent().find('.gcarouselarrow.prev'),
            next = $(this).parent().parent().parent().find('.gcarouselarrow.next');
        $(this).owlCarousel({
loop: true,
autoplay: true,
autoplayTimeout: 3000,
autoplayHoverPause: true,
            items: 4,
            itemsDesktop: [1647, 4],
            itemsDesktopSmall: [1268, 4],
            itemsTablet: [991, 3],
            itemsTabletSmall: [780, 2],
            itemsMobile: [567, 2]
        });
        prev.click(function() {
            carousel.trigger('owl.prev');
        });
        next.click(function() {
            carousel.trigger('owl.next');
        });
    });
});
Ответ написан
Комментировать
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы