From 8208d83667afd5224fc1fe87d133cb380c689986 Mon Sep 17 00:00:00 2001 From: bholmesdev Date: Sun, 21 Jul 2024 21:07:50 -0400 Subject: [PATCH] docs tweaks --- packages/query/README.md | 4 ++-- www/src/content/docs/query.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/query/README.md b/packages/query/README.md index 5d728c6..904a423 100644 --- a/packages/query/README.md +++ b/packages/query/README.md @@ -49,7 +49,7 @@ $('input').value = ''; ### `$.optional()` selector -`$()` throws when no matching element is found. To avoid this behavior, use `$.optional()`: +`$()` throws when no matching element is found. To handle undefined values, use `$.optional()`: ```astro --- @@ -87,7 +87,7 @@ ready(() => { ``` -## Global `$.ready()` function +### `$.ready()` function All `$` queries must be nested in a `$.ready()` block. This opts in to using the global `$` from client scripts. `$.ready()` also ensures your code reruns on every page [when view transitions are enabled.](https://docs.astro.build/en/guides/view-transitions/) diff --git a/www/src/content/docs/query.md b/www/src/content/docs/query.md index a935ff8..c6a7192 100644 --- a/www/src/content/docs/query.md +++ b/www/src/content/docs/query.md @@ -52,7 +52,7 @@ $('input').value = ''; ### `$.optional()` selector -`$()` throws when no matching element is found. To avoid this behavior, use `$.optional()`: +`$()` throws when no matching element is found. To handle undefined values, use `$.optional()`: ```astro --- @@ -90,7 +90,7 @@ ready(() => { ``` -## Global `$.ready()` function +## `$.ready()` function All `$` queries must be nested in a `$.ready()` block. This opts in to using the global `$` from client scripts. `$.ready()` also ensures your code reruns on every page [when view transitions are enabled.](https://docs.astro.build/en/guides/view-transitions/)