I have a form with a hidden submit button.
When I try to submit the form using the enter key it fails (alert doesn’t display).
I use the following JS:
$(function() {
$('div.quick-login form').submit(function() {
alert('test');
return false;
});
});
Any ideas as to why my code doesn’t work?
UPDATE
Browser I tested it with is Chrome.
What I always do is put in a .keypress() handler which checks the keycode.