summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorpblkt <6498458+pblkt@users.noreply.github.com>2023-04-25 22:07:00 +0300
committerGitHub <noreply@github.com>2023-04-25 13:07:00 -0600
commit900c5cf97f73a432bde6000b84e590f6c098081c (patch)
tree818501a57fc935bd51eb077376a2fdd866e4c260
parent70bd74135d2c4019294d21b8f27ad9873171556d (diff)
downloadhtmx-900c5cf97f73a432bde6000b84e590f6c098081c.tar.gz
htmx-900c5cf97f73a432bde6000b84e590f6c098081c.zip
docs: fix repetition in hx-target.md (#1378)
-rw-r--r--www/content/attributes/hx-target.md16
1 files changed, 5 insertions, 11 deletions
diff --git a/www/content/attributes/hx-target.md b/www/content/attributes/hx-target.md
index 393c165b..d6ba4a16 100644
--- a/www/content/attributes/hx-target.md
+++ b/www/content/attributes/hx-target.md
@@ -5,21 +5,15 @@ title = "hx-target"
The `hx-target` attribute allows you to target a different element for swapping than the one issuing the AJAX
request. The value of this attribute can be:
-* a CSS query selector of the element to target
-* `this` which indicates that the element that the `hx-target` attribute is on is the target
-* `closest <CSS selector>` which will find the closest parent ancestor that matches the given CSS selector.
- (e.g. `closest tr` will target the closest table row to the element)
+* A CSS query selector of the element to target.
+* `this` which indicates that the element that the `hx-target` attribute is on is the target.
+* `closest <CSS selector>` which will find the closest parent ancestor that matches the given CSS selector
+ (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.
-* a CSS query selector of the element to target
-* `this` which indicates that the element that the `hx-target` attribute is on is the target
- `next <CSS selector>` which will scan the DOM forward for the first 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)
* `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)
-* `closest <CSS selector>` which will find the closest parent ancestor that matches the given CSS selector.
- (e.g. `closest table` will target the closest parent table to the element)
-* `find <CSS selector>` which will find the first child descendant element that matches the given CSS selector.
- (e.g `find tr` will target the first child descendant row to the element)
Here is an example that targets a div: