Skip to content

Commit

Permalink
Improve docs on Modals, Alerts, Offcanvas and Toasts close triggers e…
Browse files Browse the repository at this point in the history
…xamples (#38182)

* Improve docs on Modals, Alerts, Offcanvas and Toasts close triggers examples

* Update site/layouts/shortcodes/js-dismiss.html

Co-authored-by: Julien Déramond <juderamond@gmail.com>

---------

Co-authored-by: Mark Otto <markdotto@gmail.com>
Co-authored-by: Julien Déramond <juderamond@gmail.com>
  • Loading branch information
3 people authored Mar 10, 2023
1 parent 25579aa commit fd7cfac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions site/layouts/shortcodes/js-dismiss.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

{{- $name := .Get 0 -}}

Dismissal can be achieved with the `data` attribute on a button **within the {{ $name }}** as demonstrated below:
Dismissal can be achieved with the `data-bs-dismiss` attribute on a button **within the {{ $name }}** as demonstrated below:

```html
<button type="button" class="btn-close" data-bs-dismiss="{{ $name }}" aria-label="Close"></button>
```

or on a button **outside the {{ $name }}** using the `data-bs-target` as demonstrated below:
or on a button **outside the {{ $name }}** using the additional `data-bs-target` as demonstrated below:

```html
<button type="button" class="btn-close" data-bs-dismiss="{{ $name }}" data-bs-target="#my-{{ $name }}" aria-label="Close"></button>
Expand Down

0 comments on commit fd7cfac

Please sign in to comment.