If you look at an example on the site , the classes will be applied, and if you want to run again, you need to delete and add the classes again, This is how the CSS3 animation restarts or starts again, deleting and adding classes again. You can read about it here . In your case, classes are not deleted and added again.
For Bootstrap, you can use slide.bs.carousel , where you can add classes again. I added the [data-animation] data attribute to the elements for the corresponding animation.
<div class="active item"> <img src="http://lorempixel.com/1024/750" alt="Slide1" class="img-responsive animated pulse" data-animation="pulse" /> <div class="container"> <div class="carousel-caption"> <h1 class="animated fadeInLeft" data-animation="fadeInLeft">Another example headline.</h1> <p class="animated fadeInRight" data-animation="fadeInRight">Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.</p> </div> </div> </div>
Js code
function animateElement(obj, anim_) { obj.addClass(anim_ + ' animated').one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function () { $(this).removeClass(); }); } $('#myCarousel').on('slide.bs.carousel', function (e) { var current = $('.item').eq(parseInt($(e.relatedTarget).index())); $('[data-animation]').removeClass(); $('[data-animation]', current).each(function () { var $this = $(this); var anim_ = $this.data('animation'); animateElement($this, anim_); }); });
Demo Screenshot
source share