Skip to content

Instantly share code, notes, and snippets.

@amedrz
Created April 5, 2011 16:47
Show Gist options
  • Save amedrz/903979 to your computer and use it in GitHub Desktop.
Save amedrz/903979 to your computer and use it in GitHub Desktop.
key events with jQuery.
$(document).ready(function(){
$(document).keydown(function(event){
switch(event.which){
case 13:
alert("enter");
break;
case 39:
alert("right-arrow");
break;
case 37:
alert("left-arrow");
break;
}
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment