aboutsummaryrefslogtreecommitdiff
path: root/site/content/docs/5.1/components/alerts.md
diff options
context:
space:
mode:
Diffstat (limited to 'site/content/docs/5.1/components/alerts.md')
-rw-r--r--site/content/docs/5.1/components/alerts.md16
1 files changed, 3 insertions, 13 deletions
diff --git a/site/content/docs/5.1/components/alerts.md b/site/content/docs/5.1/components/alerts.md
index 1df07983e..6127279f5 100644
--- a/site/content/docs/5.1/components/alerts.md
+++ b/site/content/docs/5.1/components/alerts.md
@@ -27,20 +27,10 @@ Alerts are available for any length of text, as well as an optional close button
Click the button below to show an alert (hidden with inline styles to start), then dismiss (and destroy) it with the built-in close button.
+{{< example >}}
<div id="liveAlertPlaceholder"></div>
-
-<div class="bd-example">
- <button type="button" class="btn btn-primary" id="liveAlertBtn">Show live alert</button>
-</div>
-
-```html
<button type="button" class="btn btn-primary" id="liveAlertBtn">Show live alert</button>
-
-<div class="alert alert-primary alert-dismissible" role="alert" id="liveAlert">
- <strong>Nice!</strong> You've triggered this alert.
- <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
-</div>
-```
+{{< /example >}}
We use the following JavaScript to trigger our live alert demo:
@@ -248,7 +238,7 @@ See the [triggers](#triggers) section for more details.
<code>getOrCreateInstance</code>
</td>
<td>
- Static method which returns an alert instance associated to a DOM element or create a new one in case it wasn't initialised.
+ Static method which returns an alert instance associated to a DOM element or create a new one in case it wasn't initialized.
You can use it like this: <code>bootstrap.Alert.getOrCreateInstance(element)</code>
</td>
</tr>