2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-06-08 17:22:31 +03:00

add code to reset data for collapsed element so that item can be intitialized with correct options

This commit is contained in:
Jacob Thornton
2011-11-27 17:31:12 -08:00
parent 7522517b47
commit 7eb340ec58
4 changed files with 20 additions and 14 deletions
+7 -1
View File
@@ -42,8 +42,14 @@
, show: function () {
var dimension = this.dimension()
, scroll = $.camelCase(['scroll', dimension].join('-'))
, actives = this.$parent && this.$parent.find('.in')
, hasData
this.$parent && this.$parent.find('.in').collapse('hide')
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')