Replicating hover for tabbing through navigation
Hey guys,
I am working on a new navigation system for a website. The navigation is an unordered list with hidden divs, hovering over the <li> element expands the hidden div and shows the menu.
I want the website to be accessible and as such would really love the div to be shown when someone tabs onto the hyperlinks inside the <li> on the main menu.
Here is the code which I use to show the hidden div when someone hovers:
- $('#health_nav_option' ).hover(function() {
- $('div.dropdown', this).toggle();});
Would there be a way to trigger the toggle there when someone tabs onto the hyperlink:
- <a href="#" id="testlink">Health</a>
Thanks,
Cian.