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

Close a specific modal popup, by providing the element Id #305

Open
selvarajan31 opened this issue May 27, 2022 · 1 comment
Open

Close a specific modal popup, by providing the element Id #305

selvarajan31 opened this issue May 27, 2022 · 1 comment

Comments

@selvarajan31
Copy link

Hi,
I need to know if there is way to close a specific modal pop up, by providing the html element id as an argument to $.modal.close()

Kindly help me with that!

@nasreddine27
Copy link

what about firing a click button trigger that close the wanted modal.

<div id="ex1" class="modal">
  <p>Thanks for clicking. That felt good.</p>
  <a id="an-id" href="#" rel="modal:close">Close</a>
</div>

$('#an-id').trigger('click');

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