title: Use Enter Keydown Event to move to the next Input
body: <p>I have a large form. As users are filling in values I would like for the <strong>enter</strong> key to take on the same behavior as the <strong>tab</strong> key (i.e. I want to move the user to the next <code>input</code> element when the <strong>enter</strong> key is pressed. </p>
  
  <p><em>Due to the way my HTML form is structured into various sections I cannot assume the next <code>input</code> is a sibling of the current input. Additionally, the classes and IDs of the inputs are not sequential.</em></p>
  
  <p><strong>jQuery:</strong></p>
  
  <pre><code>$("input").bind("keydown", function (event) {
      document.getElementById('keys').innerHTML = document.getElementById('keys').innerHTML + event.which + "&amp;nbsp;";
      if (event.which === 13) {
          event.stopPropagation();
          event.preventDefault();
          var e = $.Event("keydown");
          e.which = 9;
          $(this).trigger(e);
      }
  });
  </code></pre>
  
  <p><br/>
  <a href="http://jsfiddle.net/5a8kqshn/" rel="nofollow">JSFIDDLE</a></p>