How can I close the last opened popup in order?
The image below is an image where popup tags are stacked down whenever a popup is opened.
enter image description here
Below is the applied source.
/* ESC popup close start */
$(document).on('keyup', function(e) {
if (e.key == "Escape") $('.window .close').last().click();
});
/* ESC popup close end */