I am calling a function on button click code is given blow:
<input type="button" value="Search" id="go" />
$("#go").click(function ()
{
...
});
now I catch if user hit enter key from keyboard by this function:
$("#s").keypress(function(e) {
if(e.which == 13) {
alert('You pressed enter!');
}
});
but how could I call
$("#go").click(function ()
{
...
});
both if user hits enter key & on click GO button?