From c74e47a13943fd7f67d6182f48c85b2629666b6a Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Mon, 10 Aug 2015 16:36:44 -0700 Subject: [PATCH] rewrite alerts docs a bit --- docs/components/alerts.md | 35 ++++++++--------------------------- 1 file changed, 8 insertions(+), 27 deletions(-) diff --git a/docs/components/alerts.md b/docs/components/alerts.md index 7e40c7a749..02888a7feb 100644 --- a/docs/components/alerts.md +++ b/docs/components/alerts.md @@ -93,13 +93,10 @@ Note that closing an alert will remove it from the DOM. ### Methods -#### $().alert() - -Makes an alert listen for click events on descendant elements which have the `data-dismiss="alert"` attribute. (Not necessary when using the data-api's auto-initialization.) - -#### $().alert('close') - -Closes an alert by removing it from the DOM. If the `.fade` and `.in` classes are present on the element, the alert will fade out before it is removed. +| Method | Description | +| --- | --- | +| `$().alert()` | Makes an alert listen for click events on descendant elements which have the `data-dismiss="alert"` attribute. (Not necessary when using the data-api's auto-initialization.) | +| `$().alert('close')` | Closes an alert by removing it from the DOM. If the `.fade` and `.in` classes are present on the element, the alert will fade out before it is removed. | {% highlight js %}$(".alert").alert('close'){% endhighlight %} @@ -107,26 +104,10 @@ Closes an alert by removing it from the DOM. If the `.fade` and `.in` classes ar Bootstrap's alert plugin exposes a few events for hooking into alert functionality. -
- - - - - - - - - - - - - - - - - -
Event TypeDescription
close.bs.alertThis event fires immediately when the close instance method is called.
closed.bs.alertThis event is fired when the alert has been closed (will wait for CSS transitions to complete).
-
+| Event | Description | +| --- | --- | +| `close.bs.alert` | This event fires immediately when the close instance method is called. | +| `closed.bs.alert` | This event is fired when the alert has been closed (will wait for CSS transitions to complete). | {% highlight js %} $('#myAlert').on('closed.bs.alert', function () { -- 2.47.2