diff options
| author | Jonathan Ingram <[email protected]> | 2011-12-22 16:47:42 +1100 |
|---|---|---|
| committer | Jonathan Ingram <[email protected]> | 2011-12-22 16:47:42 +1100 |
| commit | 2ebc0ad2ef13c4eb9ab2e7b57ff6ca661687ca4e (patch) | |
| tree | b33f273780bd4fd598803cfcb96ad3f12310caa5 | |
| parent | 5de1e39a8fba831faa170f46e868068fa069dd0e (diff) | |
| download | bootstrap-2ebc0ad2ef13c4eb9ab2e7b57ff6ca661687ca4e.tar.xz bootstrap-2ebc0ad2ef13c4eb9ab2e7b57ff6ca661687ca4e.zip | |
Update docs to show available events on alert
| -rw-r--r-- | docs/javascript.html | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/docs/javascript.html b/docs/javascript.html index bf27dd7f1..0bdcdc8ed 100644 --- a/docs/javascript.html +++ b/docs/javascript.html @@ -750,6 +750,30 @@ $('a[data-toggle="tab"]').on('shown', function (e) { <h4>.alert('close')</h4> <p>Closes an alert.</p> <pre class="prettyprint linenums">$(".alert-message").alert('close')</pre> + <h3>Events</h3> + <p>Bootstrap's alert class exposes a few events for hooking into alert functionality. </p> + <table class="zebra-striped"> + <thead> + <tr> + <th style="width: 150px;">Event</th> + <th>Description</th> + </tr> + </thead> + <tbody> + <tr> + <td>close</td> + <td>This event fires immediately when the <code>close</code> instance method is called.</td> + </tr> + <tr> + <td>closed</td> + <td>This event is fired when the alert has been closed (will wait for css transitions to complete).</td> + </tr> + </tbody> + </table> +<pre class="prettyprint linenums"> +$('#my-alert').bind('closed', function () { + // do something ... +})</pre> <h3>Demo</h3> <div class="alert-message warning fade in"> <a class="close" data-dismiss="alert" href="#">×</a> |
