htmx.trigger usage #2857
-
Hello, When user clicks on an a-href link:
I need to trigger the changed event on this input:
In the javascript function doMore() which executes when click on the link, I try to use:
but can't make it work. Please help. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hey, First of all, please include exactly what you've tried when reporting issues. Sometimes the issue are the parameters themselves so it always helps to see what combinations you tried exactly. I'm just gut guessing here based on what you've written, but I notice you said
Though, you're not using a What your You could either instead trigger a Hope this helps! |
Beta Was this translation helpful? Give feedback.
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 stringCould you try
htmx.trigger(element, "search");
instead and let met know how it goes?