mirror of https://github.com/twbs/bootstrap.git
Enhance Alerts > Live Example section (#34769)
This commit is contained in:
parent
c02805bb8c
commit
a0da3a0f42
|
|
@ -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.
|
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 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>
|
<button type="button" class="btn btn-primary" id="liveAlertBtn">Show live alert</button>
|
||||||
|
{{< /example >}}
|
||||||
<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>
|
|
||||||
```
|
|
||||||
|
|
||||||
We use the following JavaScript to trigger our live alert demo:
|
We use the following JavaScript to trigger our live alert demo:
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue