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:
authorMark Otto <markdotto@gmail.com>2017-08-20 22:09:33 +0300
committerMark Otto <markdotto@gmail.com>2017-08-20 22:09:33 +0300
commit25bbfcdd7c656395c00876ae8342e56b1c6945a0 (patch)
tree5ce23cd9d344537826c78dd7e192dd1f00adf45c /js/dist/carousel.js
parent1da730c67f82324477ae1a029407b4bc04db94ee (diff)
dist
Diffstat (limited to 'js/dist/carousel.js')
-rw-r--r--js/dist/carousel.js15
1 files changed, 8 insertions, 7 deletions
diff --git a/js/dist/carousel.js b/js/dist/carousel.js
index db05a652ad..65acf70287 100644
--- a/js/dist/carousel.js
+++ b/js/dist/carousel.js
@@ -83,14 +83,14 @@ var Carousel = function ($) {
INDICATORS: '.carousel-indicators',
DATA_SLIDE: '[data-slide], [data-slide-to]',
DATA_RIDE: '[data-ride="carousel"]'
+ };
- /**
- * ------------------------------------------------------------------------
- * Class Definition
- * ------------------------------------------------------------------------
- */
+ /**
+ * ------------------------------------------------------------------------
+ * Class Definition
+ * ------------------------------------------------------------------------
+ */
- };
var Carousel = function () {
function Carousel(element, config) {
_classCallCheck(this, Carousel);
@@ -123,7 +123,8 @@ var Carousel = function ($) {
Carousel.prototype.nextWhenVisible = function nextWhenVisible() {
// Don't call next when the page isn't visible
- if (!document.hidden) {
+ // or the carousel or its parent isn't visible
+ if (!document.hidden && $(this._element).is(':visible') && $(this._element).css('visibility') !== 'hidden') {
this.next();
}
};