One way to do this would be something like (in jQuery):
$(function() { var focusfunction = function(e) { if (e.keyCode == 9) { $('body').addClass('showfocus'); document.removeEventListener('keydown', focusfunction); } } document.addEventListener('keydown', focusfunction, true); }
And only have focus styles applied under .showfocus (alternatively this could be reversed so the body has a class of hidefocus by default)
One way to do this would be something like (in jQuery):
$(function() { ('body' ).addClass( 'showfocus' ); removeEventList ener('keydown' , focusfunction); addEventListene r('keydown' , focusfunction, true);
var focusfunction = function(e) {
if (e.keyCode == 9) {
$
document.
}
}
document.
}
And only have focus styles applied under .showfocus (alternatively this could be reversed so the body has a class of hidefocus by default)