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 to auto open leanModal after ajax call success? #57

Open
thanhrossi opened this issue Jan 18, 2016 · 1 comment
Open

How to auto open leanModal after ajax call success? #57

thanhrossi opened this issue Jan 18, 2016 · 1 comment

Comments

@thanhrossi
Copy link

How to auto open leanModal after ajax call success?. Please help me

@enzomonjardin
Copy link

enzomonjardin commented Aug 30, 2017

You can have a hidden trigger for the modal, and then just invoke the click even on the trigger after the ajax call.

In your html you should add:

<a id="trigger"  href="#modal" style="display:none">Trigger</a>
<div id="modal">Your content</div>

Then, from your js, on your ajax success:

$('#trigger').click();

And the modal should open.

Hope this help!

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