1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-18 03:11:19 +02:00
This commit is contained in:
Mark Otto
2016-12-02 10:13:36 -08:00
parent e3a569f4f6
commit 3ec37d4a4d
24 changed files with 177 additions and 56 deletions

10
js/dist/carousel.js vendored
View File

@@ -108,9 +108,10 @@ var Carousel = function ($) {
// public
Carousel.prototype.next = function next() {
if (!this._isSliding) {
this._slide(Direction.NEXT);
if (this._isSliding) {
throw new Error('Carousel is sliding');
}
this._slide(Direction.NEXT);
};
Carousel.prototype.nextWhenVisible = function nextWhenVisible() {
@@ -121,9 +122,10 @@ var Carousel = function ($) {
};
Carousel.prototype.prev = function prev() {
if (!this._isSliding) {
this._slide(Direction.PREVIOUS);
if (this._isSliding) {
throw new Error('Carousel is sliding');
}
this._slide(Direction.PREVIOUS);
};
Carousel.prototype.pause = function pause(event) {