I’m looking for a way to add a CSS class to the anchor tag of the tooltip on a menu item. Currently, I see that you can easily add a CSS class to the menu’s li but I’m trying to style the tooltip itself, not the menu item.
Looking at the Codex for wp_nav_menu, I don’t see an argument available to handle adding a class to the tooltip anchor.
Is there a filter I can use? How?
FYI, I’m using a plugin called Simple Tooltips to create the tooltips, as all it requires is that I add a class to the HTML element I want to add a tooltip to.
Add this code into your functions.php
And update this wp_nav_menu code where your menu is called from theme [ header.php ]
and use “tooltips” – as menu item class and put the description to show as tips title.
and make sure the “Zebra_Tooltip” Css class z-index is more then all element’s z-index: or add this css code in style.css
There is an excellent tutorial here!