diff options
| author | Jacob Thornton <[email protected]> | 2011-12-24 22:56:40 -0800 |
|---|---|---|
| committer | Jacob Thornton <[email protected]> | 2011-12-24 22:56:40 -0800 |
| commit | 4ef5a90445f3adf86dd7cf96e588be1250403e84 (patch) | |
| tree | aa4b76688c4db23b73a94a31b511877aabc95b02 /docs/javascript.html | |
| parent | 823d89dbb23511b7ee929ddbd62661be751429d6 (diff) | |
| parent | a3822cfa843c9ecce437cf66257c7c1060881050 (diff) | |
| download | bootstrap-4ef5a90445f3adf86dd7cf96e588be1250403e84.tar.xz bootstrap-4ef5a90445f3adf86dd7cf96e588be1250403e84.zip | |
Merge branch '2.0-wip' of https://github.com/twitter/bootstrap into 2.0-wip
Diffstat (limited to 'docs/javascript.html')
| -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 7c92ef06a..d5aebbacd 100644 --- a/docs/javascript.html +++ b/docs/javascript.html @@ -718,6 +718,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> |
