From: fat Date: Sat, 22 Dec 2012 21:48:16 +0000 (-0800) Subject: read data options in constructor for collapse X-Git-Tag: v2.3.0^2~63^2~8 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a9e661a2b5cc96e2148d62fa5ccd41522197ceef;p=thirdparty%2Fbootstrap.git read data options in constructor for collapse --- 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]() })