From 2d81d65533ded88c76712e787edbd745d38e403e Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Wed, 28 Sep 2011 20:21:09 -0700 Subject: [PATCH] initial idea for handling closing of modals from whatever element you want with .js-dismiss class --- docs/index.html | 4 ++-- docs/javascript.html | 6 +++--- js/bootstrap-modal.js | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/index.html b/docs/index.html index 857af24486..b24999c623 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1644,7 +1644,7 @@ diff --git a/docs/javascript.html b/docs/javascript.html index d16926186e..d5eb987392 100644 --- a/docs/javascript.html +++ b/docs/javascript.html @@ -182,15 +182,15 @@ $('#my-modal').bind('hidden', function () { diff --git a/js/bootstrap-modal.js b/js/bootstrap-modal.js index da67060731..5c38a7477b 100644 --- a/js/bootstrap-modal.js +++ b/js/bootstrap-modal.js @@ -55,7 +55,7 @@ var Modal = function ( content, options ) { this.settings = $.extend({}, $.fn.modal.defaults) this.$element = $(content) - .delegate('.close', 'click.modal', $.proxy(this.hide, this)) + .delegate('.js-dismiss', 'click.modal', $.proxy(this.hide, this)) if ( options ) { $.extend( this.settings, options )