mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-15 10:05:40 +02:00
grunt
This commit is contained in:
14
js/dist/collapse.js
vendored
14
js/dist/collapse.js
vendored
@@ -111,11 +111,7 @@ var Collapse = function ($) {
|
||||
Collapse.prototype.show = function show() {
|
||||
var _this = this;
|
||||
|
||||
if (this._isTransitioning) {
|
||||
throw new Error('Collapse is transitioning');
|
||||
}
|
||||
|
||||
if ($(this._element).hasClass(ClassName.SHOW)) {
|
||||
if (this._isTransitioning || $(this._element).hasClass(ClassName.SHOW)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -188,11 +184,7 @@ var Collapse = function ($) {
|
||||
Collapse.prototype.hide = function hide() {
|
||||
var _this2 = this;
|
||||
|
||||
if (this._isTransitioning) {
|
||||
throw new Error('Collapse is transitioning');
|
||||
}
|
||||
|
||||
if (!$(this._element).hasClass(ClassName.SHOW)) {
|
||||
if (this._isTransitioning || !$(this._element).hasClass(ClassName.SHOW)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -338,7 +330,7 @@ var Collapse = function ($) {
|
||||
*/
|
||||
|
||||
$(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
|
||||
if (/input|textarea/i.test(event.target.tagName)) {
|
||||
if (!/input|textarea/i.test(event.target.tagName)) {
|
||||
event.preventDefault();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user