https://htmx.org logo
I’m using some vanilla JS on form elements with a ...
# htmx-general
h
I’m using some vanilla JS on form elements with a specific
data
attribute. Basically it listens for the change event and does something to the rest of the page. Now I’m using htmx to dynamically render these form elements when another input changes, but this means my event listeners don’t work anymore. I guess I’d need something like jquery’s
live()
, or some way to re-add the event listeners once htmx has finished swapping the form elements. Is there an easy/obvious way to do this?