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

Add support for a data-attribute to close open submenus #21

Open
mrwweb opened this issue Aug 14, 2024 · 1 comment
Open

Add support for a data-attribute to close open submenus #21

mrwweb opened this issue Aug 14, 2024 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers
Milestone

Comments

@mrwweb
Copy link
Owner

mrwweb commented Aug 14, 2024

Now that it's possible to close an open submenu from anywhere in the DOM (#18), it would be a very nice developer convenience to declaratively use that feature.

So my current thought is this:

<button data-close-clicky-menus="menu-id">Close Open Menu</button>

Where "menu-id" is the ID of a valid clicky-menu instance. If that were in the DOM when the script first executes, I could find those instances and then automatically handle closing submenus when the button is clicked, reducing requirements for custom code.

@mrwweb mrwweb added enhancement New feature or request good first issue Good for newcomers labels Aug 14, 2024
@mrwweb mrwweb added this to the v1.3.0 milestone Aug 14, 2024
@ajplopez
Copy link

This would be amazing. I'm starting to have close menu buttons within mega menus more often so that would make life a lot easier.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants