I'm trying to close several opened layer popups in sequence with esc. What should I do?
The currently applied source is as follows. When you press esc on the keyboard, it is clicked on the close button of the layer popup to close it.
$(document).on('keyup', function(e) {
if (e.key == "Escape") $('.window .close').click();
});
maybe like this?? I can't see all the code so this might work
$(document).on('keyup', function(e) {
if (e.key == "Escape") $('.close').click();
$('your_popup_ids').hide(); / / you can also use .toggle
});