1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-13 00:54:04 +02:00
This commit is contained in:
Mark Otto
2017-08-20 12:09:33 -07:00
parent 1da730c67f
commit 25bbfcdd7c
34 changed files with 555 additions and 173 deletions

17
js/dist/carousel.js vendored
View File

@@ -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();
}
};