From a9e661a2b5cc96e2148d62fa5ccd41522197ceef Mon Sep 17 00:00:00 2001 From: fat Date: Sat, 22 Dec 2012 13:48:16 -0800 Subject: [PATCH] read data options in constructor for collapse --- js/bootstrap-collapse.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/bootstrap-collapse.js b/js/bootstrap-collapse.js index 6755aa7e20..3498cdecbb 100644 --- a/js/bootstrap-collapse.js +++ b/js/bootstrap-collapse.js @@ -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]() })