[jQuery] Event behaving
[jQuery] Event behaving
Hi,
I have a question why is this not working:
$("button").keypress(function(e) {
e.preventDefault();
alert("hello");
});
but this here:
$("button").click(function(e) {
e.preventDefault();
alert("hello");
});
For my understanding when I hit enter in a form
keypress should work?!
thx
TC