aboutsummaryrefslogtreecommitdiff
path: root/javascript.html
diff options
context:
space:
mode:
Diffstat (limited to 'javascript.html')
-rw-r--r--javascript.html14
1 files changed, 7 insertions, 7 deletions
diff --git a/javascript.html b/javascript.html
index 06a0bd021..a6c3344f8 100644
--- a/javascript.html
+++ b/javascript.html
@@ -304,15 +304,15 @@ $('#myModal').modal({
{% endhighlight %}
<h4>.modal('toggle')</h4>
- <p>Manually toggles a modal.</p>
+ <p>Manually toggles a modal. <strong>Returns to the caller before the modal has actually been shown or hidden</strong> (i.e. before the <code>shown.bs.modal</code> or <code>hidden.bs.modal</code> event occurs).</p>
{% highlight js %}$('#myModal').modal('toggle'){% endhighlight %}
<h4>.modal('show')</h4>
- <p>Manually opens a modal.</p>
+ <p>Manually opens a modal. <strong>Returns to the caller before the modal has actually been shown</strong> (i.e. before the <code>shown.bs.modal</code> event occurs).</p>
{% highlight js %}$('#myModal').modal('show'){% endhighlight %}
<h4>.modal('hide')</h4>
- <p>Manually hides a modal.</p>
+ <p>Manually hides a modal. <strong>Returns to the caller before the modal has actually been hidden</strong> (i.e. before the <code>hidden.bs.modal</code> event occurs).</p>
{% highlight js %}$('#myModal').modal('hide'){% endhighlight %}
<h3>Events</h3>
@@ -328,11 +328,11 @@ $('#myModal').modal({
<tbody>
<tr>
<td>show.bs.modal</td>
- <td>This event fires immediately when the <code>show</code> instance method is called.</td>
+ <td>This event fires immediately when the <code>show</code> instance method is called. If caused by a click, the clicked element is available as the <code>relatedTarget</code> property of the event.</td>
</tr>
<tr>
<td>shown.bs.modal</td>
- <td>This event is fired when the modal has been made visible to the user (will wait for CSS transitions to complete).</td>
+ <td>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 <code>relatedTarget</code> property of the event.</td>
</tr>
<tr>
<td>hide.bs.modal</td>
@@ -346,8 +346,8 @@ $('#myModal').modal({
</table>
</div><!-- /.table-responsive -->
{% highlight js %}
-$('#myModal').on('hidden.bs.modal', function () {
- // do something…
+$('#myModal').on('hidden.bs.modal', function (e) {
+ // do something...
})
{% endhighlight %}
</div>