Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.