I have table, where specified cells contains inputs. Inputs not in all cells(!).
How I may navigate keyboard in this table with left-right keys?
Example - if i press 'left' in cell with value 5- I need focus on cell with value 4, next press- to cell with value 3, etc.
<table class='mytable'>
<tr>
<td><input type='text' value='1'></td>
<td></td>
<td></td>
</tr>
<tr>
<td><input type='text' value='2'></td>
<td>same text..</td>
<td><input type='text' value='3'></td>
</tr>
<tr>
<td><input type='text' value='4'></td>
<td><input type='text' value='5'></td>
<td>same text..</td>
</tr>
</table>
I know how detect key press(e.keycode
). Problem only with correctly selector for navigate to previous cell in table(not in row- need navigate in all table, but only in cell with inputs).