title: how to use nextAll to find all inputs using jquery/
body: <p>i have this html:</p>
  
  <pre><code>        &lt;div class="field phone"&gt;
              &lt;input type="text" maxlength="3" /&gt;
          &lt;/div&gt;
          &lt;div class="field phone number1"&gt;
              &lt;input type="text" maxlength="3" /&gt;
          &lt;/div&gt;
          &lt;div class="field phone number2"&gt;
              &lt;input type="text" maxlength="4" /&gt;
          &lt;/div&gt;
  </code></pre>
  
  <p>then i'm using</p>
  
  <pre><code>    $(".phone input:not(:last)").keydown(function() {
          var that = this;
          setTimeout(function() {
              if (that.prevValue != $(that).val()) {
                  that.prevValue = $(that).val();
                  if ($(that).val().length == $(that).attr("maxlength")) {
                      $(that).nextAll("input")[0].focus();
                  }
              }
          });
      });
  </code></pre>
  
  <p>the issue is that <code>$(that).nextAll("input")[0]</code> returns undefined, instead of a input selector and i cant use <code>focus()</code> on it</p>
  
  <p>any ideas what is happening here? thanks</p>