1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-21 04:41:36 +02:00

Run grunt.

[ci skip]
This commit is contained in:
XhmikosR
2015-10-14 00:49:31 +03:00
parent fe0ad82159
commit 724bf86288
25 changed files with 149 additions and 59 deletions

View File

@@ -650,6 +650,14 @@ var Carousel = (function ($) {
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() {
@@ -685,7 +693,7 @@ var Carousel = (function ($) {
}
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);
}
}
}, {