KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have two input elements, the first is focused, and I want to focus the second by simulating the TAB keypress/keydown event. ( Note : I don't want to use .next() or such.) This is my code, inspired from this question : $('input').first().focus(); var e = $.Event('keydown'); e.which = 9; // TAB $(':focus').trigger(e); Please see http://jsfiddle.net/3PcPH/ The code doesn't work. What is wrong?
Tags (comma-separated)
Save Edits
Cancel