S
S
Sergey Belyakov2020-05-28 09:47:05
css
Sergey Belyakov, 2020-05-28 09:47:05

How to change bootstrap3 carousel animation?

Good afternoon! Can you tell me how to change the transition between bootstrap3 carousel slides? You can take the animation from the Animate library. But I don't know how to use it in the carousel, and is it even possible?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Belyakov, 2020-05-29
@grey_18_08

I found a solution, I need to remove the slide class from the markup, I commented it out:

<div id="carousel-example-generic" class="carousel <!--slide-->" data-ride="carousel">

Next, you need to use js, there is an event that fires when the slide method is called, that is, when changing slides, this is described on the bootstrap site, here is the method:
$('.active tr:not(:first)').each(function(i){
    // тут мы можем подставить любое действие, я  использовал добавление классов нужным элементам из библиотека animate, получается я сменил анимацию
}) // Это событие срабатывает во время вызова метода

You can also stupidly add an animation class from the animate library to the layout itself, it will also work, even without js

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question