Spell here: http://jsfiddle.net/emJcx/1/
I have a drop-down menu that is a simple show and hides on hover. I would like this dropdown menu to be accessible via tabs. Using this code:
$("li.trigger a").focus(function(){ $(this).parent().find('ul').show(); });
I turned on the drop-down list in the focus of the main link.
Blur is getting a little more complicated. I tried this:
$("li.trigger ul li:last-child a").blur(function(){ $(this).parent().parent().hide(); });
But it only works with direct tabs, not with reverse tabs (shift-tabs).
I also tried something like this:
$('li.trigger').has('a:focus').find('ul').toggle();
But naturally, this does not work.
Any thoughts on how this might work.
Many thanks.
source share