Skip to content

Fix docs for show command #614

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
6 changes: 3 additions & 3 deletions www/commands/show.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ title: show - ///_hyperscript
### Syntax

```ebnf
show [target] [with <hide-show-strategy>[: <argument>]] [where <expr>]
show [target] [with <hide-show-strategy>[: <argument>]] [when <expr>]
```

### Description
Expand All @@ -29,7 +29,7 @@ You can add new hide/show strategies by setting the `hyperscript.config.hideShow
Note that the `display` strategy can take an argument to specify the type of display to use when showing. The default
is `block`

The `where` clause allows you filter what elements are shown in the `target`. The expression will be evaluated for
The `when` clause allows you filter what elements are shown in the `target`. The expression will be evaluated for
each element in `target` and, if the result is true, the element will be shown. If it is false, the element will be
hidden. The `it` symbol will be set to the current element, allowing you to express conditions against each element
in `target`
Expand Down Expand Up @@ -75,4 +75,4 @@ You will have to set `_hyperscript.config.defaultHideShowStrategy` to one of thi
<div _="on load wait 2s then show with *twOpacity">
I'll show after a few seconds with Tailwind CSS opacity!
</div>
```
```