From 2172e2ea8a79f8c5d43863d83ff31b50abb391a0 Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Mon, 18 Nov 2013 19:28:37 -0800 Subject: fix #11089: document modal show+shown events' relatedTarget property --- javascript.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'javascript.html') diff --git a/javascript.html b/javascript.html index 06a0bd021..06a5f4570 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 %} -- cgit v1.2.3 From afbdc21def8cf451e73895a6e2594e3dfa0a64e5 Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Mon, 18 Nov 2013 19:59:09 -0800 Subject: fixes part of #11117: doc that modal show()/hide() return before animation finishes --- javascript.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'javascript.html') diff --git a/javascript.html b/javascript.html index 06a5f4570..a6c3344f8 100644 --- a/javascript.html +++ b/javascript.html @@ -304,15 +304,15 @@ $('#myModal').modal({ {% endhighlight %}

.modal('toggle')

-

Manually toggles a modal.

+

Manually toggles a modal. Returns to the caller before the modal has actually been shown or hidden (i.e. before the shown.bs.modal or hidden.bs.modal event occurs).

{% highlight js %}$('#myModal').modal('toggle'){% endhighlight %}

.modal('show')

-

Manually opens a modal.

+

Manually opens a modal. Returns to the caller before the modal has actually been shown (i.e. before the shown.bs.modal event occurs).

{% highlight js %}$('#myModal').modal('show'){% endhighlight %}

.modal('hide')

-

Manually hides a modal.

+

Manually hides a modal. Returns to the caller before the modal has actually been hidden (i.e. before the hidden.bs.modal event occurs).

{% highlight js %}$('#myModal').modal('hide'){% endhighlight %}

Events

-- cgit v1.2.3