mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-16 10:34:07 +02:00
grunt
This commit is contained in:
12
js/dist/collapse.js
vendored
12
js/dist/collapse.js
vendored
@@ -103,7 +103,11 @@ var Collapse = function ($) {
|
||||
Collapse.prototype.show = function show() {
|
||||
var _this = this;
|
||||
|
||||
if (this._isTransitioning || $(this._element).hasClass(ClassName.ACTIVE)) {
|
||||
if (this._isTransitioning) {
|
||||
throw new Error('Collapse is transitioning');
|
||||
}
|
||||
|
||||
if ($(this._element).hasClass(ClassName.ACTIVE)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -176,7 +180,11 @@ var Collapse = function ($) {
|
||||
Collapse.prototype.hide = function hide() {
|
||||
var _this2 = this;
|
||||
|
||||
if (this._isTransitioning || !$(this._element).hasClass(ClassName.ACTIVE)) {
|
||||
if (this._isTransitioning) {
|
||||
throw new Error('Collapse is transitioning');
|
||||
}
|
||||
|
||||
if (!$(this._element).hasClass(ClassName.ACTIVE)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user