Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] event listener to target #554

Open
mdesco-crgl opened this issue Jul 18, 2024 · 0 comments
Open

[Feature Request] event listener to target #554

mdesco-crgl opened this issue Jul 18, 2024 · 0 comments

Comments

@mdesco-crgl
Copy link

When used in conjunction with htmx, I will often use _hs to perform some action at the end of the htmx swap or request.

Example:

<button hx-get="/get" hx-target="#the-target-of-htmx"></button>
<div id="the-target-of-htmx" _="on htmx:afterRequest from previous <button/> toggle .cool-style on me"></div>

What I would like is to be able to use a to keyword in place of from such that the following selector matches the target of the event such as

<div id="the-target-of-htmx" _="on htmx:afterRequest to me toggle .cool-style on me"></div>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant