1. The decision
The methods below do not have short names, such as "open" and "closed."
They must be called through the instance object. "instance" is only available when at least one popup has been opened. For example: $. MagnificPopup.instance.doSomething ();
here is an example of individual closure for magnificPopup
// save the magnificPopup instance in a variable
var magnificPopup = $.magnificPopup.instance;
// open a large-scale instance
$.magnificPopup.open({ items: { src: 'someimage.jpg' }, type: 'image' }, 0);
// Close the popup that is currently open
magnificPopup.close();
// Navigation while the gallery is on
magnificPopup.next(); // go to next item magnificPopup.prev(); // go to prev item magnificPopup.goTo(4); // go to item
// update popup content. Useful after changing "items"
magnificPopup.updateItemHTML();
2. Decision
you can add a button in a popup window and assign a function in a click event, for example:
$('#close-button-verify').click(function(){
If a popup is triggered through an onClick event, then the same jQuery object can be used to close this popup
$('#close-button-verify').click(function(){ $('#id_of_button_that_opened_magnificpopup').magnificPopup('close'); });
good luck :)