1

I have such problem. On my site i use 2 popup windows. On button click opened first popup. By clicking on link inside first popup opened second popup-window. Problem: When i click on close button in second popup - at the same time, both popup windows are closed. Goal: close only secon popup window. I use this js-code for 2 popups:

/* Popup */
$('.open-popup-link').magnificPopup({
  type:'inline',
  midClick: true
});

HTML Code:

<a href="#first-popup" class="open-popup-link">Button</a>
<div id="first-popup" class="popup-form">
    <!-- first popup content --> 
<a href="#second-popup" class="open-popup-link">Link</a>
</div> <div id="second-popup" class="popup-form">
    <!-- second popup content -->
</div>

Tell me please how to do it, thank you in advance.

Andy Donegan
  • 782
  • 1
  • 9
  • 30
Mark
  • 11
  • 1
  • please show more code, your HTML will help others to show how to fix your problem. – Andy Donegan Jun 29 '17 at 10:30
  • `Button ` When i click to close button on secon popup - at the same time, both popup windows are closed. – Mark Jun 29 '17 at 10:53
  • https://stackoverflow.com/questions/21908580/how-to-open-popup-within-popup-in-magnific-popup-plugin -- If you take a look at the plug in site and on SO in general Magnifipopup does not handle two popups at all and they have no plan to handle it. Some other user might have a work around but you may need to rethink how you are trying to do what you plan. – Andy Donegan Jun 29 '17 at 14:24

0 Answers0