Reputation: 89
I have multiple modal in my project and some modal will open via javascript. I need if any modal is in open state no other modal will open. How can we do this?
Upvotes: 0
Views: 361
Reputation: 455
If you are going to launch all your modals via javascript/jquery then you can check with
if ($('.modal .in').length() > 0) {
//at least one open modal detected
return;
else {
//show modal
}
Upvotes: 1