Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Close on ESC #21

Open
a-sharapov opened this issue Jun 25, 2013 · 1 comment
Open

Close on ESC #21

a-sharapov opened this issue Jun 25, 2013 · 1 comment

Comments

@a-sharapov
Copy link

Hi. maybe add any construction like this:

$(document).keyup(function(e) {
if (e.keyCode == 27) { hideOverlay(); }
});

@nazgut
Copy link

nazgut commented Nov 28, 2014

    $(window).bind('keydown', function(e){
        if (e.keyCode == 37){
            showPrevious();
        }
        else if (e.keyCode==39){
            showNext();
        }
        else if (e.keyCode == 27){
            hideOverlay();
        }

    });

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants