Open the magnificPopup window:
function showWin(Ids) {$.magnificPopup.open({items : [{src : currentDomain+'/igc/admin_selected_goods.html?Ids='+ Ids,type : 'iframe',height : '150px',width : '500px'}]});return $.magnificPopup.instance;}
Close Window
function closeWin(popWin){popWin.close();}
View the showWin method. The pop-up window is of the iframe type. In other words, to close the current magnificPopup window on the new page, the idea is as follows:
1. define A global _ instance variable on page A, and call the showWin method to assign the returned value to the _ instance variable;
var _instance;_instance = showWin(value);
2. Define A closePopWin Method on page A, and call the closeWin (_ instance) method in it;
function closePopWin(){closeWin(_instance);}
3. Call the closePopWin Method on page A on page B.
function closePop(){window.top.frames[1].frames[1].closePopWin();}
4. Add a button on page B to call the closePop method.