mirror of
https://github.com/twbs/bootstrap.git
synced 2025-09-26 21:39:08 +02:00
add code to reset data for collapsed element so that item can be intitialized with correct options
This commit is contained in:
8
js/bootstrap-collapse.js
vendored
8
js/bootstrap-collapse.js
vendored
@@ -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')
|
||||
|
Reference in New Issue
Block a user