:
anchor.
:
$('#ajax_response a').focus();
$('#ajax_response a:eq(0)').focus();
Update
. :
$(document).ready(function () {
$('#ajax_response a:eq(0)').focus();
var keyindex, alinks;
keyindex = -1;
$('#ajax_response').keydown(function (e) {
alinks = $('#ajax_response').find('a');
if (e.keyCode == 40) {
e.preventDefault();
if (keyindex == -1) {
keyindex = 1;
}
if (alinks.length > 0 && keyindex < alinks.length) {
$('#ajax_response').find('a')[keyindex++].focus();
}
}
if (e.keyCode == 38) {
e.preventDefault();
if (keyindex == alinks.length) {
keyindex = keyindex - 2;
}
if (alinks.length > 0 && keyindex < alinks.length && keyindex >= 0) {
$('#ajax_response').find('a')[keyindex--].focus();
}
}
});
$('#ajax_response a').on("click", function (e) {
var index = $(this).parent().index();
keyindex = index+1;
console.log(index);
})
});