문제

I have to use multiple bootstrap carousel in single page.If i am using different id for each carousel its possible. But I want use same class or id..it is possible?I have tried like this $('.myCarousel').carousel();

도움이 되었습니까?

해결책

Try this:

$(document).ready(function() {
  $('.carousel').each(function(){
      $(this).carousel({
          interval: 3000
      });
   });
});

http://jsfiddle.net/7DLyk/4/

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top