Skip to content

Commit 4c6685f

Browse files
committed
Issue #23 fix.
1 parent e06dd51 commit 4c6685f

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

bootstrap-tabcollapse.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,14 @@
1313
this._initAccordion();
1414
this._checkStateOnResize();
1515

16-
this.checkState();
16+
17+
// checkState() has gone to setTimeout for making it possible to attach listeners to
18+
// shown-accordion.bs.tabcollapse event on page load.
19+
// See https://github.com/flatlogic/bootstrap-tabcollapse/issues/23
20+
var that = this;
21+
setTimeout(function() {
22+
that.checkState();
23+
}, 0);
1724
};
1825

1926
TabCollapse.DEFAULTS = {

0 commit comments

Comments
 (0)