mirror of
https://github.com/twbs/bootstrap.git
synced 2025-09-27 05:49:07 +02:00
Run grunt
.
[ci skip]
This commit is contained in:
15
docs/dist/js/umd/carousel.js
vendored
15
docs/dist/js/umd/carousel.js
vendored
@@ -136,6 +136,14 @@
|
||||
this._slide(Direction.NEXT);
|
||||
}
|
||||
}
|
||||
}, {
|
||||
key: 'nextWhenVisible',
|
||||
value: function nextWhenVisible() {
|
||||
// Don't call next when the page isn't visible
|
||||
if (!document.hidden) {
|
||||
this.next();
|
||||
}
|
||||
}
|
||||
}, {
|
||||
key: 'prev',
|
||||
value: function prev() {
|
||||
@@ -171,7 +179,7 @@
|
||||
}
|
||||
|
||||
if (this._config.interval && !this._isPaused) {
|
||||
this._interval = setInterval($.proxy(this.next, this), this._config.interval);
|
||||
this._interval = setInterval($.proxy(document.visibilityState ? this.nextWhenVisible : this.next, this), this._config.interval);
|
||||
}
|
||||
}
|
||||
}, {
|
||||
@@ -404,7 +412,10 @@
|
||||
|
||||
if (typeof config === 'number') {
|
||||
data.to(config);
|
||||
} else if (action) {
|
||||
} else if (typeof action === 'string') {
|
||||
if (data[action] === undefined) {
|
||||
throw new Error('No method named "' + action + '"');
|
||||
}
|
||||
data[action]();
|
||||
} else if (_config.interval) {
|
||||
data.pause();
|
||||
|
Reference in New Issue
Block a user