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
2018-01-11 22:42:40 -08:00
parent 80d0943b95
commit 6d8d8639f3
42 changed files with 356 additions and 385 deletions

15
js/dist/carousel.js vendored
View File

@@ -100,12 +100,12 @@ var Carousel = function ($) {
this._indicatorsElement = $(this._element).find(Selector.INDICATORS)[0];
this._addEventListeners();
} // getters
} // Getters
var _proto = Carousel.prototype;
// public
// Public
_proto.next = function next() {
if (!this._isSliding) {
this._slide(Direction.NEXT);
@@ -195,7 +195,7 @@ var Carousel = function ($) {
this._isSliding = null;
this._activeElement = null;
this._indicatorsElement = null;
}; // private
}; // Private
_proto._getConfig = function _getConfig(config) {
@@ -221,7 +221,7 @@ var Carousel = function ($) {
});
if ('ontouchstart' in document.documentElement) {
// if it's a touch-enabled device, mouseenter/leave are fired as
// If it's a touch-enabled device, mouseenter/leave are fired as
// part of the mouse compatibility events on first tap - the carousel
// would stop cycling until user tapped out of it;
// here, we listen for touchend, explicitly pause the carousel
@@ -260,7 +260,6 @@ var Carousel = function ($) {
break;
default:
return;
}
};
@@ -352,7 +351,7 @@ var Carousel = function ($) {
}
if (!activeElement || !nextElement) {
// some weirdness is happening, so we bail
// Some weirdness is happening, so we bail
return;
}
@@ -394,7 +393,7 @@ var Carousel = function ($) {
if (isCycling) {
this.cycle();
}
}; // static
}; // Static
Carousel._jQueryInterface = function _jQueryInterface(config) {
@@ -418,7 +417,7 @@ var Carousel = function ($) {
data.to(config);
} else if (typeof action === 'string') {
if (typeof data[action] === 'undefined') {
throw new Error("No method named \"" + action + "\"");
throw new TypeError("No method named \"" + action + "\"");
}
data[action]();