title: navigate to each tr input boxes through keypress arrow up down
body: <pre><code>$(document).keypress(hover);
  
  function hover(e) {
  
      var lent = $(".edit_tr").length; //8 
      var sid = $('.edit_tr').attr('id');
      var x = parseInt(sid) + lent;
      if (stat == false) {
          var sid = parseInt(sid) + 1;
      }
      switch (e.keyCode) { //down   
  
          case 40:
  
              $("#last_" + sid).hide();
              $("#last_input_" + sid).show();
              $("#sub_input_" + sid).show();
              $("#sub_" + sid).hide();
              $("#sub_input_" + sid).focus();
  
              var stat = false;
              break;
  
          case 38:
              //up
  
              $("#last_" + sid).show();
              $("#last_input_" + sid).hide();
              $("#sub_input_" + sid).hide();
              $("#sub_" + sid).show();
              $("#sub_input_" + sid).blur();
              break;
      }
  }
  </code></pre>
  
  <p>i want to navigate through keypress arrow/up and down in each tr's input text how can i navigate them base on the id from the tr? i am new to jquery </p>