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

How can I open modal with a class name? #203

Closed
zemian opened this issue Aug 25, 2023 · 3 comments
Closed

How can I open modal with a class name? #203

zemian opened this issue Aug 25, 2023 · 3 comments

Comments

@zemian
Copy link

zemian commented Aug 25, 2023

Hi, I have couple of issues to ask regarding modal usage:

  1. Is there reason I can't get the "Basic Dialog" example code working as mentioned in the doc?
    See https://codepen.io/zemian/pen/XWomVzN

  2. Is there a class we can use to open the Modal instead of using <a href="#">? This is not a good way when using other JS that we do not want to modify the URL. It is much preferred to have a CSS class to activate modal instead.

@zemian
Copy link
Author

zemian commented Aug 26, 2023

Oh just found modal—visible class. Please update docs!

@Spiderpig86
Copy link
Owner

  1. This doesn't work because the link in <a href="#test-modal">Open Modal</a> is references an HTML element with the id of test-modal when it doesn't exist. Your modal is still defined with an id of basic-modal. You can find out more about this in this part of the docs

  2. Yup, that is a new class. Will update the docs.

@Spiderpig86
Copy link
Owner

This was updated in commit 70ffb04, closing.

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