+1 vote
by
Hi all! There is one very good carousel . It has system Kabakov that doesn't run in my curve hands. So I'm using this design for the wings event slider.

$('#slider').on('changed.owl.carousel', function(){
$(this).find(".owl-item.activer").addClass('animated bounceOutUp');
});
The bottom line is that I need to lose the animation of the slide content before the change (previous slide) and the next slide come into place, play the animation in it (new slide).

Everything is good, but the animation of the care is played very quickly, so the slide transition you need to make delay. I don't understand where it is possible to push, please help!

$('#slider').on('changed.owl.carousel', function(){
setTimeout(function(){
$(this).find(".owl-item.activer").addClass('animated bounceOutUp');
},600);
});
This design is not working (perhaps because I'm disabled).

1 Answer

+1 vote
by
There is no difference: for callback you hang will function or event to track.
I would not put setTimeout, because it is a delayed call - try to quickly spin your carousel :)

If we put, then stay tuned

$('#slider').on('initialized.owl.carousel translated.owl.carousel', function (e) {
//т.е. инициализация(для первого вызова) и полная смена слайда

//Edited
//Возможно вам нужно очищать классы
$('.owl-item').removeClass('animated bounceOutUp');

$('.owl-item.activer').addClass('animated с заданным animation-delay bounceOutUp');
}
And I just do not really understand what your problem is. Delay can be set in css for animation
by
Dmitry Sergeevich : Well I just feel not right not to allow the user to scroll. Let them leafs, and the animation just disappears from the current slide(removed classes as I wrote above(it can be done beautifully)) and starts on the new slide.
And in order to, in auto mode, the slide is not way in succession prematurely during animation, enough time of the slide(autoplayTimeout) > duration of animation + its delay.
by
like-a-boss : Ideally both =)
by
Dmitry Sergeevich : ie not to give the user handles to turn the slide until the end of the animation? or still in the car flipping?
by
The problem is not the animation, but the fact that slide too quickly leafing through, I need to slow down. He needs to wait until the animation plays out, and then already looked through.
...