KeyTable focus on input
KeyTable focus on input
Hello
I have a table (not a datatable) that has some values that are strings and some are inputs. I would like to use KeyTable to provide arrow navigation between the inputs and not the strings - so arrowing around should skip the tds without inputs. I would also like the inputs to come into focus when a users tabs/arrows to that td.
Is this possible. Can you point me in the right direction?
Here is an example: http://jsfiddle.net/HRVL7/1/
Note: I am using jquery 1.9 and the current dev version of KeyTable from git.
Thanks!
I have a table (not a datatable) that has some values that are strings and some are inputs. I would like to use KeyTable to provide arrow navigation between the inputs and not the strings - so arrowing around should skip the tds without inputs. I would also like the inputs to come into focus when a users tabs/arrows to that td.
Is this possible. Can you point me in the right direction?
Here is an example: http://jsfiddle.net/HRVL7/1/
Note: I am using jquery 1.9 and the current dev version of KeyTable from git.
Thanks!
This discussion has been closed.
Replies
var keys = new KeyTable( {
"table": document.getElementById('datatable'),
"focus": $('.classofTDtoFocus')[0]
} );
keys.event.focus( null, null, function() {
$(keys.fnGetCurrentTD()).children('.classofinput').focus();
} );