I have a problem with JQuery Bpopup. When the user already has a popup windows open; a second one can open aswell. This is causing problems: after pressing escape both popups are closed but the modal overlay stays. The page needs to be refreshed to function again.
I thought of two solutions:
Check if a popup is already open before opening a new one. I can not find the right code/check for this.
Fix whatever is causing this strange behaviour when closing the popup.
FYI: each popup is a DIV that is hidden by default. In this case the DIV ID = popup_message
$('#popup_message').bPopup({appendTo:'form',zindex:999,modalClose:false});
I solved the issue by updating the Bpopup library to the newest version. I was on 0.5