1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-10-03 08:41:59 +02: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

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]()
})