How to change Bootstrap Carousel Interval at Runtime ?
Approach 1: We can control the animation by using the data interval attribute of each carousel item. The given example is the best example for understanding this concept. The Data-interval attribute is used to set the interval time between two carousel item by default its value is 3000 milliseconds.
Approach 2: In this approach, we will change the animation interval using the bootstrap API method. Which takes one argument as an interval of unit millisecond i.e. (1s=1000milisecond). The interval that we assign will change the animation time between all carousel items in runtime. Data-interval in the carousel function is used to set the time between two image slides.
interval: time in millisecond
"data-interval","interval that you want to set (in milisec)
- Google Chrome
- Internet Explorer
Share your thoughts in the comments
Please Login to comment...