Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions www/content/attributes/hx-disabled-elt.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ added to them for the duration of the request. The value of this attribute can b
* `find <CSS selector>` which will find the first child descendant element that matches the given CSS selector
* `next` which resolves to [element.nextElementSibling](https://developer.mozilla.org/docs/Web/API/Element/nextElementSibling)
* `next <CSS selector>` which will scan the DOM forward for the first element that matches the given CSS selector
(e.g. `next button` will disable the closest following sibling `button` element)
(e.g. `next button` will disable the closest following `button` element — note this scans the whole DOM forward, not just siblings)
* `previous` which resolves to [element.previousElementSibling](https://developer.mozilla.org/docs/Web/API/Element/previousElementSibling)
* `previous <CSS selector>` which will scan the DOM backwards for the first element that matches the given CSS selector.
(e.g. `previous input` will disable the closest previous sibling `input` element)
(e.g. `previous input` will disable the closest previous `input` element — note this scans the whole DOM backward, not just siblings)

Here is an example with a button that will disable itself during a request:

Expand Down
4 changes: 2 additions & 2 deletions www/content/attributes/hx-include.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ attribute can be:
(e.g. `closest tr` will target the closest table row to the element).
* `find <CSS selector>` which will find the first child descendant element that matches the given CSS selector.
* `next <CSS selector>` which will scan the DOM forward for the first element that matches the given CSS selector.
(e.g. `next .error` will target the closest following sibling element with `error` class)
(e.g. `next .error` will target the next element with `error` class — note this scans the whole DOM forward, not just siblings)
* `previous <CSS selector>` which will scan the DOM backwards for the first element that matches the given CSS selector.
(e.g. `previous .error` will target the closest previous sibling with `error` class)
(e.g. `previous .error` will target the previous element with `error` class — note this scans the whole DOM backward, not just siblings)

Here is an example that includes a separate input value:

Expand Down
4 changes: 2 additions & 2 deletions www/content/attributes/hx-target.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ request. The value of this attribute can be:
* `find <CSS selector>` which will find the first child descendant element that matches the given CSS selector.
* `next` which resolves to [element.nextElementSibling](https://developer.mozilla.org/docs/Web/API/Element/nextElementSibling)
* `next <CSS selector>` which will scan the DOM forward for the first element that matches the given CSS selector.
(e.g. `next .error` will target the closest following sibling element with `error` class)
(e.g. `next .error` will target the next element with `error` class — note this scans the whole DOM forward, not just siblings)
* `previous` which resolves to [element.previousElementSibling](https://developer.mozilla.org/docs/Web/API/Element/previousElementSibling)
* `previous <CSS selector>` which will scan the DOM backwards for the first element that matches the given CSS selector.
(e.g. `previous .error` will target the closest previous sibling with `error` class)
(e.g. `previous .error` will target the previous element with `error` class — note this scans the whole DOM backward, not just siblings)


Here is an example that targets a div:
Expand Down
4 changes: 2 additions & 2 deletions www/content/attributes/hx-trigger.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ is seen again before the delay completes, it is ignored, the element will trigge
* `find <CSS selector>` - finds the closest child matching the given css selector
* `next` resolves to [element.nextElementSibling](https://developer.mozilla.org/docs/Web/API/Element/nextElementSibling)
* `next <CSS selector>` scans the DOM forward for the first element that matches the given CSS selector.
(e.g. `next .error` will target the closest following sibling element with `error` class)
(e.g. `next .error` will target the next element with `error` class — note this scans the whole DOM forward, not just siblings)
* `previous` resolves to [element.previousElementSibling](https://developer.mozilla.org/docs/Web/API/Element/previousElementSibling)
* `previous <CSS selector>` scans the DOM backwards for the first element that matches the given CSS selector.
(e.g. `previous .error` will target the closest previous sibling with `error` class)
(e.g. `previous .error` will target the previous element with `error` class — note this scans the whole DOM backward, not just siblings)
* `target:<CSS selector>` - allows you to filter via a CSS selector on the target of the event. This can be useful when you want to listen for
triggers from elements that might not be in the DOM at the point of initialization, by, for example, listening on the body,
but with a target filter for a child element
Expand Down
4 changes: 2 additions & 2 deletions www/content/extensions/response-targets.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ The value of each attribute can be:
(e.g. `closest tr` will target the closest table row to the element).
* `find <CSS selector>` which will find the first child descendant element that matches the given CSS selector.
* `next <CSS selector>` which will scan the DOM forward for the first element that matches the given CSS selector.
(e.g. `next .error` will target the closest following sibling element with `error` class)
(e.g. `next .error` will target the next element with `error` class — note this scans the whole DOM forward, not just siblings)
* `previous <CSS selector>` which will scan the DOM backwards for the first element that matches the given CSS selector.
(e.g `previous .error` will target the closest previous sibling with `error` class)
(e.g. `previous .error` will target the previous element with `error` class — note this scans the whole DOM backward, not just siblings)

## Installing

Expand Down
Loading