From: Jacob Thornton Date: Fri, 25 Nov 2011 04:12:13 +0000 (-0800) Subject: fix some more modal things X-Git-Tag: v2.0.0~6^2~415^2~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b14f551c9c1498247dc69251f8eebfde3b1002f6;p=thirdparty%2Fbootstrap.git fix some more modal things --- 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) }) })