Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/carousel.js')
-rw-r--r--js/src/carousel.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/js/src/carousel.js b/js/src/carousel.js
index 2d7ab0d672..610319a6e0 100644
--- a/js/src/carousel.js
+++ b/js/src/carousel.js
@@ -385,6 +385,14 @@ const Carousel = (($) => {
$(activeElement).addClass(directionalClassName)
$(nextElement).addClass(directionalClassName)
+ const nextElementInterval = parseInt(nextElement.getAttribute('data-interval'), 10)
+ if (nextElementInterval) {
+ this._config.defaultInterval = this._config.defaultInterval || this._config.interval
+ this._config.interval = nextElementInterval
+ } else {
+ this._config.interval = this._config.defaultInterval || this._config.interval
+ }
+
const transitionDuration = Util.getTransitionDurationFromElement(activeElement)
$(activeElement)