diff options
Diffstat (limited to 'js/dist/collapse.js')
-rw-r--r-- | js/dist/collapse.js | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/js/dist/collapse.js b/js/dist/collapse.js index 41c5533b5c..000c9256ee 100644 --- a/js/dist/collapse.js +++ b/js/dist/collapse.js @@ -46,7 +46,7 @@ var Collapse = function ($) { }; var ClassName = { - ACTIVE: 'active', + SHOW: 'show', COLLAPSE: 'collapse', COLLAPSING: 'collapsing', COLLAPSED: 'collapsed' @@ -58,7 +58,7 @@ var Collapse = function ($) { }; var Selector = { - ACTIVES: '.card > .active, .card > .collapsing', + ACTIVES: '.card > .show, .card > .collapsing', DATA_TOGGLE: '[data-toggle="collapse"]' }; @@ -93,7 +93,7 @@ var Collapse = function ($) { // public Collapse.prototype.toggle = function toggle() { - if ($(this._element).hasClass(ClassName.ACTIVE)) { + if ($(this._element).hasClass(ClassName.SHOW)) { this.hide(); } else { this.show(); @@ -107,7 +107,7 @@ var Collapse = function ($) { throw new Error('Collapse is transitioning'); } - if ($(this._element).hasClass(ClassName.ACTIVE)) { + if ($(this._element).hasClass(ClassName.SHOW)) { return; } @@ -155,7 +155,7 @@ var Collapse = function ($) { this.setTransitioning(true); var complete = function complete() { - $(_this._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).addClass(ClassName.ACTIVE); + $(_this._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).addClass(ClassName.SHOW); _this._element.style[dimension] = ''; @@ -184,7 +184,7 @@ var Collapse = function ($) { throw new Error('Collapse is transitioning'); } - if (!$(this._element).hasClass(ClassName.ACTIVE)) { + if (!$(this._element).hasClass(ClassName.SHOW)) { return; } @@ -201,7 +201,7 @@ var Collapse = function ($) { Util.reflow(this._element); - $(this._element).addClass(ClassName.COLLAPSING).removeClass(ClassName.COLLAPSE).removeClass(ClassName.ACTIVE); + $(this._element).addClass(ClassName.COLLAPSING).removeClass(ClassName.COLLAPSE).removeClass(ClassName.SHOW); this._element.setAttribute('aria-expanded', false); @@ -269,7 +269,7 @@ var Collapse = function ($) { Collapse.prototype._addAriaAndCollapsedClass = function _addAriaAndCollapsedClass(element, triggerArray) { if (element) { - var isOpen = $(element).hasClass(ClassName.ACTIVE); + var isOpen = $(element).hasClass(ClassName.SHOW); element.setAttribute('aria-expanded', isOpen); if (triggerArray.length) { |