title: Focus next input once reaching maxlength in different containers
body: <p>I want to focus next input once the input field reach the maxlength, but the input fields are in different containers. </p>
  
  <p>My Code:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>    $(document).ready(function(){
          $('input').keyup(function(){
              if($(this).val().length==$(this).attr("maxlength")){
                  $(this).next().focus();
              }
          });
      });</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;div id="date" class="container_date"&gt;
      &lt;div class="date_day" id="input_day"&gt;
          &lt;input type="text" maxlength="2" name="input_day" id="1" value=""&gt;
      &lt;/div&gt;
      &lt;div class="date_month" id="input_month"&gt;
          &lt;input type="text" maxlength="2" name="input_month" id="2" value=""&gt;
      &lt;/div&gt;
      &lt;div class="date_year" id="input_year"&gt;
          &lt;input type="text" maxlength="4" name="input_year" id="3" value=""&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  
  
      &lt;div id="time" class="container_time"&gt;
          &lt;div class="time_hour" id="input_hour"&gt;
              &lt;input type="text" maxlength="2" name="input_hour" id="1" value=""&gt;
          &lt;/div&gt;
          &lt;div class="time_minute" id="input_minute"&gt;
              &lt;input type="text" maxlength="2" name="input_minute" id="2" value=""&gt;
          &lt;/div&gt;
      &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>The Jquery works for input fields in the same div/container, but not in a different one. How to focus also in another div/container?</p>