title: Jquery: On enter focus next input
body: <p>I am currently trying to focus the next input type when the user presses on enter by using Jquery. However, it doesn't detect the keypress for some reason.</p>
  
  <p>The input types are inside a css class named mGrid.</p>
  
  <pre><code>function addFocusSupport() {
      $(".mGrid").find('input').each(function (index, element) {
          // Here we get all the TextFields
          alert($(this));
          $(this).on("keypress",
              function (e) {
                  if (e.KeyCode() === 13) {
                      // Focus next textfield
                      alert("Enter Pressed");
                      var nextElement = $('[index="' + (this.Index + 1) + '"]');
                      nextElement.focus();
                      alert(nextElement);
                      e.preventDefault();
                  }
                  // TODO: For last TextField, do nothing
              });
      });
  }
  </code></pre>
  
  <p>So what I am trying to do:
  The user fills in the first input, press enter and automatically the next text box is selected. See it as a tab pressed.</p>
  
  <p>But the event after      <code>if (e.KeyCode() === 13) {</code> is never triggered?</p>