I currently have a full-screen pop-up, and inside this pop-up I have a link that opens another large-scale pop-up. Sort of:
$('.logbook-entry-details').magnificPopup({
type: 'ajax',
closeBtnInside:true,
closeOnBgClick:false,
closeOnContentClick:false,
callbacks: {
beforeOpen: function () {
$.magnificPopup.close();
},
open: function() {
console.log('Popup open has been initiated');
},
beforeClose: function() {
console.log('Popup before close has been initiated');
},
close: function() {
console.log('Popup close has been initiated');
},
afterClose :function() {
console.log('Popup after close has been initiated');
}
}
});
After reading it, I found that the callbacks of the second pop-up window will not be registered until I close the original pop-up window, since opening a new one simply replaces the contents and does not actually recreate the new instance.
I'm trying to figure out how I could link my link inside my popup to the current popup before invoking code to open a new one so that it can register my callbacks.
, , , - . , .