Jump to content

disable or stop 2nd popup from opening


vinpkl

Recommended Posts

Hi all

I am using magnific popup script to open two popups.

First popup is opening on click of a link.

Second popup is opening automatically on page load after 5 second interval.

Now i want is, if First magnific Popup is already opened, then second magnific popup should not open till first is open.

How can i do it ??

here is a codepen

http://codepen.io/vineet/pen/EjvxLN

Thanks
Vineet
 

Link to comment
https://forums.phpfreaks.com/topic/296870-disable-or-stop-2nd-popup-from-opening/
Share on other sites

  • 3 weeks later...

I'm assuming that you meant to say "... then second magnific popup should not open till first is open closed."

 

One option, when the document is loaded, as well as checking that #myModal exists, also check if the first popup is visible. If it is visible, then attach a click hander to the close button of that first popup, which will trigger the second popup to show.

That will ensure the second popup will show directly after closing the first.

 

Denno

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.