Change animation height on Bootstrap 3 Carousel

Studying the question "How to animate height changes on Bootstrap 3 Carousel", I found this answer , however it has no effect on my bootstrap carousel. I still can not comment and ask for clarification there, so a new question.

The proposed solution is

function bsCarouselAnimHeight()
{
$('.carousel').carousel({
    interval: 5000
}).on('slide.bs.carousel', function (e)
{
    var nextH = $(e.relatedTarget).height();
    $(this).find('.active.item').parent().animate({ height: nextH }, 500);
});
}

But, as I said, without any effect. Maybe I should change any selectors in Javascript in my case?

Update:

I updated the fiddle so that it really shows the problem.

All ideas are welcome! Thank.

+4
source share
1 answer

. function bsCarouselAnimHeight() , .

http://jsfiddle.net/4HDBe/3/

.

http://jsfiddle.net/4HDBe/4/

+6

Source: https://habr.com/ru/post/1539914/


All Articles