V
V
Vladislav Startsev2019-03-30 12:58:44
JavaScript
Vladislav Startsev, 2019-03-30 12:58:44

How to completely disable bootstrap carousel autoscroll?

The site has 2 carousels at the beginning and this code:

$('#panel_1_1').carousel({interval: false});
$('#panel_2_1').carousel({interval: false});

$('.nav-tabs li').on('click', function(){
 $('.tab-panel').carousel({interval: false});
 if( $('.tab-panel').hasClass('active') ){
  var panel_content_id =  $(this).children().attr('href');
  $(panel_content_id).carousel({interval: false});
 }
});

So that the carousel does not scroll by itself and everything seems to be fine, but as soon as you scroll to the next slide, auto scrolling turns on again. How to disable auto scroll?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question