diff options
Diffstat (limited to 'docs/components/alerts.md')
| -rw-r--r-- | docs/components/alerts.md | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/docs/components/alerts.md b/docs/components/alerts.md index 56e8b089c..da72e322e 100644 --- a/docs/components/alerts.md +++ b/docs/components/alerts.md @@ -1,6 +1,7 @@ --- layout: docs title: Alerts +description: Provide contextual feedback messages for typical user actions with the handful of available and flexible alert messages. group: components --- @@ -60,7 +61,7 @@ Alerts can also contain additional HTML elements like headings and paragraphs. <div class="alert alert-success" role="alert"> <h4 class="alert-heading">Well done!</h4> <p>Aww yeah, you successfully read this important alert message. This example text is going to run a bit longer so that you can see how spacing within an alert works with this kind of content.</p> - <p class="m-b-0">Whenever you need to, be sure to use margin utilities to keep things nice and tidy.</p> + <p class="mb-0">Whenever you need to, be sure to use margin utilities to keep things nice and tidy.</p> </div> {% endexample %} @@ -72,12 +73,12 @@ Using the alert JavaScript plugin, it's possible to dismiss any alert inline. He - Be sure you've loaded the alert plugin, or the compiled Bootstrap JavaScript. - Add a dismiss button and the `.alert-dismissible` class, which adds extra padding to the right of the alert and positions the `.close` button. - On the dismiss button, add the `data-dismiss="alert"` attribute, which triggers the JavaScript functionality. Be sure to use the `<button>` element with it for proper behavior across all devices. -- To animate alerts when dismissing them, be sure to add the `.fade` and `.in` classes. +- To animate alerts when dismissing them, be sure to add the `.fade` and `.show` classes. You can see this in action with a live demo: {% example html %} -<div class="alert alert-warning alert-dismissible fade in" role="alert"> +<div class="alert alert-warning alert-dismissible fade show" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span> </button> @@ -110,7 +111,7 @@ Note that closing an alert will remove it from the DOM. | 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. | +| `$().alert('close')` | Closes an alert by removing it from the DOM. If the `.fade` and `.show` classes are present on the element, the alert will fade out before it is removed. | {% highlight js %}$(".alert").alert('close'){% endhighlight %} |
