Request info
Trigger Demo
Standard Events
Button is triggered by the
click
event.Input, textarea and select fields are
triggered by the
change
event
(For input and textarea, this triggers when you move the
focus out of the input).
Input
Textarea
Select
Forms are triggered by the
submit
event.
Everything else is triggered by the
click
event.
I am a div you can click on to trigger a htmx request.
Trigger Modifiers
This has
hx-
trigger="keyup changed delay:500ms"
This has
hx-trigger="keyup[shiftKey&&key=='K'] from:body"
.
Press SHIFT-K to have the div replaced by the htmx response.
Trigger filters
This has
hx-trigger="click[shiftKey]"
I am a div you can click on to trigger a htmx request if you
have SHIFT pressed.
Special events
The div below is replaced 3 seconds after the page is loaded
I am a div that will be replaced on page load.
The div below is replaced every second
I am a div that is replaced every second.
The div below is only loaded when scrolling into view
I am a div that is replaced when scrolling into view.