Skip to content

Commit

Permalink
Added ability to close with keyboard command
Browse files Browse the repository at this point in the history
  • Loading branch information
byee01 authored and mkelly12 committed Apr 20, 2011
1 parent 266ac82 commit 1397f68
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions jquery.reveal.js
Expand Up @@ -71,6 +71,9 @@
modalBG.css({"cursor":"pointer"})
modalBG.bind('click.modalEvent',closeModal)
}
$('body').keyup(function(e) {
if(e.keyCode==27){ closeModal(); } // 27 is the keycode for the Escape key
});


/*---------------------------
Expand Down

0 comments on commit 1397f68

Please sign in to comment.