How can detect the keyboard key down and trigger this line?
$('#submit_p').live('click',function(event){...}
Thanks.
$(document).keydown(function()){
if(event.keyCode == 37){ //prev key
}else if(event.keyCode == 39){ //next key
}else if(event.keyCode == 13){ //enter key
$('#submit_p').live('click',function(event){...}
}if(event.keyCode == 27){ //escape key
}
}