Bootstrap carousel does not restart

I am using Bootstrap 3 and have problems with mine carousel. I have 12 items. I managed to start mine carouselusing the following:

$(function() {
  $('.carousel').carousel({
    interval: 1000,
    cycle: true
  });
  $('[data-slide-to=0]').trigger('click');
});

The problem is that the first cycle completes successfully, automatically, but when it comes to the end, the large image disappears, but nothing happens with the indicators. The indicators continue the cycle from beginning to end without a large image.

Img 1: Normal slider, sliding to the end: enter image description here

Img 2: The slider disappears and the indicators stay and restart from the beginning, as usual.

enter image description here

When I open firebugand add “active” to the first image, it becomes normal.

carousel, , ?

JSFiddle

+4
1

Bootstrap v3 , "", . :

 $(function(){
     $('.carousel').carousel({ interval: 1000 });
 }); 

item , , .

https://jsfiddle.net/66o0g8a0/1/

+2

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


All Articles