diff --git a/docs/javascript.html b/docs/javascript.html index bf27dd7f17..0bdcdc8ed5 100644 --- a/docs/javascript.html +++ b/docs/javascript.html @@ -750,6 +750,30 @@ $('a[data-toggle="tab"]').on('shown', function (e) {

.alert('close')

Closes an alert.

$(".alert-message").alert('close')
+

Events

+

Bootstrap's alert class exposes a few events for hooking into alert functionality.

+ + + + + + + + + + + + + + + + + +
EventDescription
closeThis event fires immediately when the close instance method is called.
closedThis event is fired when the alert has been closed (will wait for css transitions to complete).
+
+$('#my-alert').bind('closed', function () {
+  // do something ...
+})

Demo

×