vodkabears / Remodal

No longer actively maintained.
http://vodkabears.github.io/remodal/
MIT License
2.76k stars 774 forks source link

Check if modal has been closed once or destroyed #284

Open cvanderlinden opened 6 years ago

cvanderlinden commented 6 years ago

I am looking for a way to see if the modal has already been closed once or .destroy() has been called.

I got around it by adding a classed on modal close, and the checking if the modal exists with that class, it's a little hacky. Wondering if there is a better option here.

yunusga commented 6 years ago

Check it in Remodal#methods and Remodal#events

cvanderlinden commented 6 years ago

Right, I did. getState() can tell me when it's closed, but it will also say closed before it's been activated once. Events is what I use to add the CSS class I mentioned in the first comment. Doesn't help.