mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-10 15:44:51 +02:00
add code to reset data for collapsed element so that item can be intitialized with correct options
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/* ==========================================================
|
||||
* bootstrap-alerts.js v2.0.0
|
||||
* bootstrap-alert.js v2.0.0
|
||||
* http://twitter.github.com/bootstrap/javascript.html#alerts
|
||||
* ==========================================================
|
||||
* Copyright 2011 Twitter, Inc.
|
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