2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-06-08 17:22:31 +03:00

Merge branch 'raphaelz-patch-1' into 2.0.1-wip

Conflicts:
	docs/assets/bootstrap.zip
This commit is contained in:
Mark Otto
2012-02-06 23:36:31 -08:00
7 changed files with 24 additions and 10 deletions
Binary file not shown.
+4 -3
View File
@@ -26,7 +26,7 @@
* ====================== */
var Modal = function ( content, options ) {
this.options = $.extend({}, $.fn.modal.defaults, options)
this.options = options
this.$element = $(content)
.delegate('[data-dismiss="modal"]', 'click.dismiss.modal', $.proxy(this.hide, this))
}
@@ -177,16 +177,17 @@
return this.each(function () {
var $this = $(this)
, data = $this.data('modal')
, options = typeof option == 'object' && option
, options = $.extend({}, $.fn.modal.defaults, typeof option == 'object' && option)
if (!data) $this.data('modal', (data = new Modal(this, options)))
if (typeof option == 'string') data[option]()
else data.show()
else if (options.show) data.show()
})
}
$.fn.modal.defaults = {
backdrop: true
, keyboard: true
, show: true
}
$.fn.modal.Constructor = Modal