0

There is a table with input fields in every cell. I added DataTables + KeyTable to manage it and navigate with arrow keys. It works perfectly but need one more function. When I press enter on an input I want to move the focus to the next cell in the row. Like triggering right arrow on pressing enter. If it's the last one in it's row, move the focus to the next row's first input I tried to catch the enter key but no success.

1 Answers1

0

on Enter trigger Tab

this will might Help you Fiddle

https://stackoverflow.com/a/8546331/6631280

$('input,textarea,select').keypress(function(e){
  if(e.keyCode==13)  
   $(this).nextAll('input,textarea,select').first().focus();
});
Ravi Makwana
  • 2,782
  • 1
  • 29
  • 41