Commit 5b4a29d8 authored by Jacob Thornton's avatar Jacob Thornton

honor data attributes set on modal as well

parent d7953a8f
...@@ -177,7 +177,7 @@ ...@@ -177,7 +177,7 @@
return this.each(function () { return this.each(function () {
var $this = $(this) var $this = $(this)
, data = $this.data('modal') , data = $this.data('modal')
, options = $.extend({}, $.fn.modal.defaults, typeof option == 'object' && option) , options = $.extend({}, $.fn.modal.defaults, $this.data(), typeof option == 'object' && option)
if (!data) $this.data('modal', (data = new Modal(this, options))) if (!data) $this.data('modal', (data = new Modal(this, options)))
if (typeof option == 'string') data[option]() if (typeof option == 'string') data[option]()
else if (options.show) data.show() else if (options.show) data.show()
......
...@@ -177,7 +177,7 @@ ...@@ -177,7 +177,7 @@
return this.each(function () { return this.each(function () {
var $this = $(this) var $this = $(this)
, data = $this.data('modal') , data = $this.data('modal')
, options = $.extend({}, $.fn.modal.defaults, typeof option == 'object' && option) , options = $.extend({}, $.fn.modal.defaults, $this.data(), typeof option == 'object' && option)
if (!data) $this.data('modal', (data = new Modal(this, options))) if (!data) $this.data('modal', (data = new Modal(this, options)))
if (typeof option == 'string') data[option]() if (typeof option == 'string') data[option]()
else if (options.show) data.show() else if (options.show) data.show()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment