Im struggling to create a tabbing technique using jquery so that the user can use the tab key and navigate through the anchor tags within a container div. I would like the active anchor to become highlighted whilst tabbing through. Is this possible?
Thanks,
My attempt below, this fails.
$(document).ready(function () {
var tabindex = 1;
var obj = $('#myDiv').find('a').first().focus();
$('#myDiv').find('a').each(function () {
$(this).attr("tabindex", tabindex);
$(this).css('border', 'solid 1px black');
tabindex++;
});
});
Tabbing essentially focuses a control. You can simply subscribe to the focus event.
So assuming you have a
highlightfunction somewhere, and aselectorstring for items in tab order: