aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorJacob Thornton <[email protected]>2011-11-27 17:31:12 -0800
committerJacob Thornton <[email protected]>2011-11-27 17:31:12 -0800
commit7eb340ec589acd56ad960a020969822636c2bc54 (patch)
tree83a2886faefd9c939c30a13e0d080d9f17b0610b /js
parent7522517b47521da731bf7a598d5e5a71721c4c44 (diff)
downloadbootstrap-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')
-rw-r--r--js/bootstrap-alert.js (renamed from js/bootstrap-alerts.js)2
-rw-r--r--js/bootstrap-button.js (renamed from js/bootstrap-buttons.js)0
-rw-r--r--js/bootstrap-collapse.js10
3 files changed, 9 insertions, 3 deletions
diff --git a/js/bootstrap-alerts.js b/js/bootstrap-alert.js
index 5f600ba1f..210512a8b 100644
--- a/js/bootstrap-alerts.js
+++ b/js/bootstrap-alert.js
@@ -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.
diff --git a/js/bootstrap-buttons.js b/js/bootstrap-button.js
index 1cafe4d68..1cafe4d68 100644
--- a/js/bootstrap-buttons.js
+++ b/js/bootstrap-button.js
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')