vinpkl Posted June 17, 2015 Share Posted June 17, 2015 Hi allI 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/EjvxLNThanksVineet Quote Link to comment https://forums.phpfreaks.com/topic/296870-disable-or-stop-2nd-popup-from-opening/ Share on other sites More sharing options...
denno020 Posted July 4, 2015 Share Posted July 4, 2015 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 Quote Link to comment https://forums.phpfreaks.com/topic/296870-disable-or-stop-2nd-popup-from-opening/#findComment-1515558 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.