Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'js/bootstrap-modal.js')
-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 14c03e6a3e..2860c8a518 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)
})
})