aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Thornton <[email protected]>2011-11-24 20:12:13 -0800
committerJacob Thornton <[email protected]>2011-11-24 20:12:13 -0800
commitb14f551c9c1498247dc69251f8eebfde3b1002f6 (patch)
tree4a3600197e9aee7a3e9ac3dcc145b31818ffa4ad
parent1fa02fbda2bb3710a9f26a487da2c34565e8c406 (diff)
downloadbootstrap-b14f551c9c1498247dc69251f8eebfde3b1002f6.tar.xz
bootstrap-b14f551c9c1498247dc69251f8eebfde3b1002f6.zip
fix some more modal things
-rw-r--r--js/bootstrap-modal.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/js/bootstrap-modal.js b/js/bootstrap-modal.js
index 14c03e6a3..2860c8a51 100644
--- a/js/bootstrap-modal.js
+++ b/js/bootstrap-modal.js
@@ -192,8 +192,10 @@
$(document).ready(function () {
$('body').delegate('[data-toggle="modal"]', 'click.modal.data-api', function ( e ) {
var $this = $(this)
+ , target = $this.attr('data-target')
+ , option = $(target).data('modal') ? 'toggle' : $this.data()
e.preventDefault()
- $($this.attr('data-target')).modal($this.data())
+ $(target).modal(option)
})
})