With jQuery, how do I find out which key was pressed when I bind to the keypress event?
$(\'#searchbox input\').bind(\'keypress\', function(e) {}); >
$(\'#searchbox input\').bind(\'keypress\', function(e) {});
$(document).bind('keypress', function (e) { console.log(e.which); //or alert(e.which); });
you should have firbug to see a result in console