bigskysoftware / bigskysoftware/_hyperscript

toggle <something> until <event> at last <timeout>

Open
#164 2 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
JavaScript
Stars
3.8k
Forks
172
PR merge metrics
No merged PRs in 30d

Description

Typical usage of `toggle` is to disable a button on a click until a response is loaded, e.g.:

`on click toggle [@disabled=true] until htmx:afterOnLoad`

In case a response fails somehow, the button remains disabled.

I would invite some sort of timeout option which would toggle back either on an event or at given timeout, whatever comes sooner.

E.g.:

`on click toggle [@disabled=true] until htmx:afterOnLoad at last in 5s`

or explain me, how it can be done today.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.