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

Does x-target require a form? #81

Closed
eydun opened this issue Jul 5, 2024 · 2 comments
Closed

Does x-target require a form? #81

eydun opened this issue Jul 5, 2024 · 2 comments

Comments

@eydun
Copy link
Contributor

eydun commented Jul 5, 2024

X-target is working for me when using forms.

But if I use a simple html-link with href, then it does not work for me.

<a href="/contacts" x-target="contacts">Open</a>

I guess that is intended behavior?

@imacrayon
Copy link
Owner

It should work. Make sure you have an x-data or x-init on the link or on a parent element too.

@eydun
Copy link
Contributor Author

eydun commented Jul 5, 2024

Thanks, it was x-init that was missing!

@eydun eydun closed this as completed Jul 5, 2024
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

2 participants