Change focus if input field is blank
<p>I'll make function if the focus of input field is blank, focus will be change to other input field, it's possible if using jquery?</p>

<p>I've trying but doesn't work.</p>

<p>Here's HTML Code:</p>

<pre><code>&lt;form&gt;
  Username:&lt;br /&gt;
  &lt;input type="text" id="username" name="username" value="notblank" /&gt;&lt;br /&gt;
  &lt;br /&gt;
  Password:&lt;br /&gt;
  &lt;input type="text" id="password" name="password" value="notblank" /&gt;
&lt;/form&gt;
</code></pre>

<p>Here's Jquery Code:</p>

<pre><code>$('#password').each(function(){
  if($(this).val() == ''){
    $('#username').focus();
    return false;
  }
});
</code></pre>

<p>Here's <a href="http://jsfiddle.net/4m5fg/547/" rel="nofollow">JSFiddle Example</a>.</p>

<p>Thanks.</p>