From 7fcd3ac390bb0a0aecf0e794999388879bddf451 Mon Sep 17 00:00:00 2001 From: eduardolat <57238554+eduardolat@users.noreply.github.com> Date: Wed, 20 Mar 2024 21:40:38 -0600 Subject: [PATCH] Add documentation for multiple CSS selectors in hx-disabled-elt This update clarifies the hx-disabled-elt attribute's ability to accept multiple CSS selectors, separated by commas, enabling developers to disable multiple elements simultaneously during an HTTP request. --- www/content/attributes/hx-disabled-elt.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/www/content/attributes/hx-disabled-elt.md b/www/content/attributes/hx-disabled-elt.md index 0b3e6afd6..bc9faf931 100644 --- a/www/content/attributes/hx-disabled-elt.md +++ b/www/content/attributes/hx-disabled-elt.md @@ -21,6 +21,15 @@ Here is an example with a button that will disable itself during a request: When a request is in flight, this will cause the button to be marked with [the `disabled` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/disabled), which will prevent further clicks from occurring. +The `hx-disabled-elt` attribute also supports specifying multiple CSS selectors separated by commas to disable multiple elements during the request. Here is an example that disables a button and a text input field during the request: + +```html +
+``` + ## Notes * `hx-disable-elt` is inherited and can be placed on a parent element