Reputation: 865
I have a very simple magnific popup modal, which has a link inside it. When the link is clicked though, the URL isn't loaded and the only way to continue is to close the modal. Here's my code to initiate the popup:
jQuery(document).ready(function( $ ) {
$('.popup-content').magnificPopup({
type: 'inline',
fixedContentPos: true,
fixedBgPos: true,
overflowY: 'scroll',
closeBtnInside: true,
preloader: false,
callbacks: {
beforeOpen: function() {
this.st.mainClass = this.st.el.attr('data-effect');
}
},
midClick: true,
removalDelay: 300
});
});
And my HTML:
<a class="popup-content" href="#modal" data-effect="my-mfp-slide-bottom">Open popup link</a>
<div id="modal" class="zoom-anim-dialog mfp-hide">
<a href="http://example.com">This link does not work</a>
</div>
Upvotes: 0
Views: 1128
Reputation: 2323
Add onclick='window.open("https://example.com");'
to your anchor tag.So now your link will look like
<a href="http://example.com" onclick='window.open("https://example.com");'>This link does not work</a>
Upvotes: 1