D
D
Dmitry2016-12-10 13:23:59
JavaScript
Dmitry, 2016-12-10 13:23:59

How to add slide transition animation for owl-carousel2 custom buttons?

Good afternoon. There is a slider on owl-carousel2. The slide transition animation effects on standard buttons work, but when I display them like this

$(".next-button").click(function(){
  owl.trigger('next.owl.carousel');
});
$(".prev-button").click(function(){
  owl.trigger('prev.owl.carousel');
});

does not work. Tell me how to initialize the animation. Thank you. The whole init script:
// Главный слайдер
var owl = $(".g-header__slider__js");
owl.owlCarousel({
  animateOut: 'slideOutDown',
    animateIn: 'flipInX',
    items: 1,
  nav:true,
  autoplayTimeout: 2000, // Время смены слайдов
  smartSpeed:1750, // плавность смены слайда
  loop: true
});
$(".next-button").click(function(){
  owl.trigger('next.owl.carousel');
});
$(".prev-button").click(function(){
  owl.trigger('prev.owl.carousel');
});

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question