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

fixes #14282 - Already Visible collapse gets closed when .collapse('show') is called

This commit is contained in:
fat
2014-08-18 19:58:19 -07:00
parent ea0e1606dc
commit 9c2e54bfec
2 changed files with 33 additions and 1 deletions
+1 -1
View File
@@ -124,7 +124,7 @@
var data = $this.data('bs.collapse')
var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)
if (!data && options.toggle && option == 'show') option = !option
if (!data && options.toggle && option == 'show') options.toggle = false
if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))
if (typeof option == 'string') data[option]()
})