mirror of
https://github.com/Hopiu/bootstrap.git
synced 2026-03-18 05:30:22 +00:00
read data options in constructor for collapse
This commit is contained in:
parent
fad0fb683b
commit
a9e661a2b5
1 changed files with 1 additions and 1 deletions
2
js/bootstrap-collapse.js
vendored
2
js/bootstrap-collapse.js
vendored
|
|
@ -129,7 +129,7 @@
|
|||
return this.each(function () {
|
||||
var $this = $(this)
|
||||
, data = $this.data('collapse')
|
||||
, options = typeof option == 'object' && option
|
||||
, options = $.extend({}, $.fn.collapse.defaults, $this.data(), typeof option == 'object' && option)
|
||||
if (!data) $this.data('collapse', (data = new Collapse(this, options)))
|
||||
if (typeof option == 'string') data[option]()
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in a new issue