diff options
| author | Jacob Thornton <[email protected]> | 2011-11-27 17:31:12 -0800 |
|---|---|---|
| committer | Jacob Thornton <[email protected]> | 2011-11-27 17:31:12 -0800 |
| commit | 7eb340ec589acd56ad960a020969822636c2bc54 (patch) | |
| tree | 83a2886faefd9c939c30a13e0d080d9f17b0610b /js/bootstrap-collapse.js | |
| parent | 7522517b47521da731bf7a598d5e5a71721c4c44 (diff) | |
| download | bootstrap-7eb340ec589acd56ad960a020969822636c2bc54.tar.xz bootstrap-7eb340ec589acd56ad960a020969822636c2bc54.zip | |
add code to reset data for collapsed element so that item can be intitialized with correct options
Diffstat (limited to 'js/bootstrap-collapse.js')
| -rw-r--r-- | js/bootstrap-collapse.js | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/js/bootstrap-collapse.js b/js/bootstrap-collapse.js index 629d9b589..93f91513e 100644 --- a/js/bootstrap-collapse.js +++ b/js/bootstrap-collapse.js @@ -42,8 +42,14 @@ , show: function () { var dimension = this.dimension() , scroll = $.camelCase(['scroll', dimension].join('-')) - - this.$parent && this.$parent.find('.in').collapse('hide') + , actives = this.$parent && this.$parent.find('.in') + , hasData + + if (actives && actives.length) { + hasData = actives.data('collapse') + actives.collapse('hide') + hasData || actives.data('collapse', null) + } this.$element[dimension](0) this.transition('addClass', 'show', 'shown') |
