Simulating the TAB keydown: focusing next element as determined by `tabIndex`
<p>I have two input elements, the first is focused, and I want to focus the second by simulating the TAB keypress/keydown event. (<em>Note</em>: I don't want to use <code>.next()</code> or such.)</p>

<p>This is my code, inspired from <a href="http://stackoverflow.com/questions/3368578/trigger-a-keypress-keydown-keyup-event-in-js-jquery">this question</a>:</p>

<pre><code>$('input').first().focus();

var e = $.Event('keydown');

e.which = 9; // TAB
$(':focus').trigger(e);
</code></pre>

<p>Please see <a href="http://jsfiddle.net/3PcPH/">http://jsfiddle.net/3PcPH/</a></p>

<p>The code doesn't work. What is wrong?</p>
