Hi, i have a form like:
<form id='new_key' action='/foo/bar' method='post'>
<input type="text" id="u">
<input type="submit" value="submit">
</form>
I can bind a jquery event to this element like:
<script type="text/javascript">
$('#new_key').ready(function() {
alert('Handler for .submit() called.');
return false;
});
It works as expected
but if i do:
<script type="text/javascript">
$('#new_key').submit(function() {
alert('Handler for .submit() called.');
return false;
});
it dont work. does anybody knows why? what am i missing?