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) {});
The easiest way that I do is:
$("#element").keydown(function(event) { if (event.keyCode == 13) { localiza_cep(this.value); } });