Custom Carousel Intervals?

后端 未结 2 1471
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-07 06:22

In Bootstrap 3, with jQuery is there a way to sort by the index of my carousel and add custom intervals of each slide so that I can have one slide 10000ms and another 500ms

2条回答
  •  情书的邮戳
    2021-01-07 07:18

    The solution given by @MattD seems to work well, alternatively you could overwrite the slide function of the carousel plugin bu using the following code:

    
     
    

    The above enables you to set the interval per slide leveraging the data-interval attribute as shown below:

提交回复
热议问题