https://htmx.org logo
1. Trigger custom events the way you describe it 2...
# htmx-general
r
1. Trigger custom events the way you describe it 2. Hook into htmx events, verify the condition and call
preventDefault
when condition is not met (can also be done with _hyperscript) 3. Define a JS function and use event filters (e.g.,
click[!elementExists()]
). The function must be in the global scope