From: Chris Rebert Date: Tue, 19 Nov 2013 03:28:37 +0000 (-0800) Subject: fix #11089: document modal show+shown events' relatedTarget property X-Git-Tag: v3.0.3~16^2~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2172e2ea8a79f8c5d43863d83ff31b50abb391a0;p=thirdparty%2Fbootstrap.git fix #11089: document modal show+shown events' relatedTarget property --- diff --git a/javascript.html b/javascript.html index 06a0bd021b..06a5f45700 100644 --- a/javascript.html +++ b/javascript.html @@ -328,11 +328,11 @@ $('#myModal').modal({ show.bs.modal - This event fires immediately when the show instance method is called. + This event fires immediately when the show instance method is called. If caused by a click, the clicked element is available as the relatedTarget property of the event. shown.bs.modal - This event is fired when the modal has been made visible to the user (will wait for CSS transitions to complete). + This event is fired when the modal has been made visible to the user (will wait for CSS transitions to complete). If caused by a click, the clicked element is available as the relatedTarget property of the event. hide.bs.modal @@ -346,8 +346,8 @@ $('#myModal').modal({ {% highlight js %} -$('#myModal').on('hidden.bs.modal', function () { - // do something… +$('#myModal').on('hidden.bs.modal', function (e) { + // do something... }) {% endhighlight %}