Nested Modal using Ajax (Magnific Popup)


#1

Hi All,

Can you help me on this jquery issue I have? How do you add a nested modal using Magnific Popup? A link that shows modal inside a modal using Ajax.

here’s my code below.

main HTML

<a href="single-page.html" class="simple-ajax-popup">Link One</a>

when a Link One is click it will show modal ajax… when modal shows there is a link inside, something like this.

<a href="single-page2.html" class="simple-ajax-popup">Page Two</a>

and now it will show “single-page2.html” modal using ajax.

jQuery

$('.simple-ajax-popup').magnificPopup({
      type: 'ajax',
      callbacks: {
        ajaxContentAdded: function() { 
         /*  This is my callback jquery inside a modal*/
        }
      }
    });

Thank you!