From 303624b78fd2008fa204dcb8331ba0fe4e05d65f Mon Sep 17 00:00:00 2001 From: makasaurus Date: Sat, 9 Oct 2021 17:11:09 -0400 Subject: [PATCH] 445 - Add hx-target="this" example Added quick example for a link that can update itself using hx-target="this". --- www/attributes/hx-target.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/www/attributes/hx-target.md b/www/attributes/hx-target.md index c1018c7d..a53bf9b6 100644 --- a/www/attributes/hx-target.md +++ b/www/attributes/hx-target.md @@ -28,6 +28,11 @@ Here is an example that targets a div: The response from the `/register` url will be appended to the `div` with the id `response-div`. +This example uses `hx-target="this"` to make a link that updates itself when clicked: +```html +New link +``` + ### Notes * `hx-target` is inherited and can be placed on a parent element