0
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-01-18 10:52:19 +01:00

fix some more modal things

This commit is contained in:
Jacob Thornton 2011-11-24 20:12:13 -08:00
parent 1fa02fbda2
commit b14f551c9c

View File

@ -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)
})
})