diff options
Diffstat (limited to 'assets/javascripts/bootstrap/carousel.js')
-rw-r--r-- | assets/javascripts/bootstrap/carousel.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/assets/javascripts/bootstrap/carousel.js b/assets/javascripts/bootstrap/carousel.js index 1be1f5d..c657834 100644 --- a/assets/javascripts/bootstrap/carousel.js +++ b/assets/javascripts/bootstrap/carousel.js @@ -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(); } }; |