My favorites | Sign in
Project Home Downloads Issues
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 378: How to tell if a modal is already open?
2 people starred this issue and may be notified of changes. Back to list
Status:  Fixed
Owner:  ----
Closed:  Nov 2009


 
Reported by n8cs...@gmail.com, Nov 12, 2009
I am implementing bookmarking and back button functionality in an
application that uses Nyromodal and need to know how to check if a modal is
already open.

I know you can call jQuery.nyroModalRemove(); to remove a modal, but I only
want to do that if a modal is actually open.

Thanks!


Nov 12, 2009
Project Member #1 nyro...@gmail.com
The best idea might be to add a global variable using one of the many callback.
For instance, you can do:
$.nyroModalSettings({
  processHandler: function() {
    window.nyroModalHere = true;
  },
  endRemove: function() {
    window.nyroModalHere = false;
  }
});

As you guessed, you then only need to check against the var window.nyroModalHere.
Status: Fixed

Powered by Google Project Hosting