문제

How can i put a delay of 2 seconds for the Bootstrap carousel slides to change?

i'm using via data attributes. this is my carousel div:

<div id="carousel-content" class="carousel slide" data-ride="carousel">

Thanks.

도움이 되었습니까?

해결책

Edit

After you commented with a link to your code, i saw that you are using carousel via data attributes.

add data-interval="2000" to your carousel div

result:

<div id="carousel-content" class="carousel slide" data-ride="carousel" data-interval="2000">

Check out Bootstrap's official documentation

$('.carousel').carousel({
  interval: 2000
})
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top