Fabyo, pay attention, the solution below only works if you have a form like that: <form> One <input type="text name="one" value="" /> Two <input type="text name="two" value="" /> Three <input type="text name="three" value="" /> </form>
$("[EMAIL PROTECTED]").bind("keydown", function(e){ if (e.keyCode == 13) { $(this).next().focus(); return false; } });
If you have a more complex/realistic form like: <form> <label>One <input type="text name="one" value="" /></label> <label>Two <input type="text name="two" value="" /></label> <label>Three <input type="text name="three" value="" /></label> </form> ... you can use something like: $("[EMAIL PROTECTED]").bind("keydown", function(e){ if (e.keyCode == 13) { $(this).parent().next().children("input").focus(); return false; } });