Skip to content

htmx.trigger usage #2857

Answered by Telroshan
aurelian2020 asked this question in Q&A
Aug 30, 2024 · 1 comments · 3 replies
Discussion options

You must be logged in to vote

It does not work. In browser Developer Tools - Console there is an error: /search is not defined/ - at the line with htmx.trigger

Looking at your example above, it seems like you pass search directly, as if it was a variable, but htmx.trigger expects an event name here, thus a string

Could you try htmx.trigger(element, "search"); instead and let met know how it goes?

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@aurelian2020
Comment options

@Telroshan
Comment options

Answer selected by aurelian2020
@aurelian2020
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants