1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-13 09:04:14 +02:00
This commit is contained in:
Mark Otto
2017-04-01 19:18:29 -07:00
parent 5142de7e59
commit 49b6cf845d
20 changed files with 105 additions and 116 deletions

10
js/dist/carousel.js vendored
View File

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