Skip to content

Commit

Permalink
Reverse 099486f
Browse files Browse the repository at this point in the history
  • Loading branch information
pvdlg committed Mar 23, 2017
1 parent 7c4ed09 commit f12a613
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions js/src/collapse.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@ const Collapse = (($) => {

const Selector = {
ACTIVES : '.card > .show, .card > .collapsing',
DATA_TOGGLE : '[data-toggle="collapse"]',
DATA_CHILDREN : 'data-children'
DATA_TOGGLE : '[data-toggle="collapse"]'
}


Expand All @@ -84,14 +83,6 @@ const Collapse = (($) => {
this._addAriaAndCollapsedClass(this._element, this._triggerArray)
}

this._selectorActives = Selector.ACTIVES
if (this._parent) {
const childrenSelector = this._parent.hasAttribute(Selector.DATA_CHILDREN) ? this._parent.getAttribute(Selector.DATA_CHILDREN) : null
if (childrenSelector !== null) {
this._selectorActives = `${childrenSelector} > .show, ${childrenSelector} > .collapsing`
}
}

if (this._config.toggle) {
this.toggle()
}
Expand Down Expand Up @@ -132,7 +123,7 @@ const Collapse = (($) => {
let activesData

if (this._parent) {
actives = $.makeArray($(this._parent).find(this._selectorActives))
actives = $.makeArray($(this._parent).find(Selector.ACTIVES))
if (!actives.length) {
actives = null
}
Expand Down

0 comments on commit f12a613

Please sign in to comment.