Update hx-indicator.md

This commit is contained in:
Ben Croker 2020-05-28 01:10:24 +02:00 committed by GitHub
parent 7a097dc49b
commit a9ade676b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -54,12 +54,12 @@ CSS. Here is an example that uses `display` rather than opacity:
}
```
Note that the target of the `ic-indicator` selector need not be the exact element that you
Note that the target of the `hx-indicator` selector need not be the exact element that you
want to show: it can be any element in the parent hierarchy of the indicator.
Finally, note that the `htmx-request` class by default is added to the element causing
the request, so you can place an indicator inside of that element and not need to explictly
call it out with the `ic-indicator` attribute:
call it out with the `hx-indicator` attribute:
```html
<button hx-post="/example">
@ -81,4 +81,4 @@ This simulates what a spinner might look like in that situation:
* `hx-indicator` is inherited and can be placed on a parent element
* In the absence of an explicit indicator, the `htmx-request` class will be added to the element triggering the
request
request