I\'m trying to create a little search box that allows you to search Twitter based on the keyword you enter in the input field. While it\'s work, it only works if you press the S
If you want place event with not obtrusive js then you can use also this system:
$("#element").keydown(function(event) {
if (event.keyCode == 13) {
// do stuff
}
also if you have a submit button, this is an alternative, #element must be the text field where you want catch the event.
reference to this: answer