I try to change focus whenever a user clicks a tab in the last field. I want to focus on a different input field.
I have the following javascript code:
$("#input2").keydown( function() { if(event.which == 9) { $("#input1").focus(); } } );
And this is my test html code:
<div id="inputArea1"> <input id="input1" /> <input id="input2" /> </div>
It seems to work with keyup (changing part of focus), but again I don't get what I want with keyup.
What am I missing?
source share