Download & Extend

removing menu link titles for SuperFish menus?

Project:AdaptiveTheme
Version:7.x-3.1
Component:Theme Settings
Category:support request
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

Having the "menu link titles" (aka tool tips) appear on top of the submenus can be quite annoying.

So, it was great to find the AT Markup Override:
Remove menu link titles
Checking this setting will remove all menu link titles (tool tips). This only works for menu blocks.

So, I enabled this, flushed caches. but it didn't work -- same annoying tooltips.
(drp7.rvuuf.org Pixture Reloaded)

it occurred to me that maybe "menu blocks" refers to just normal menu blocks.
shouldn't this setting also work with Superfish menu blocks ?

if this can't be fixed, are there any easy workarounds to get rid of tooltips
(from my research, title attributes seem to be treated specially, so evidently not a simple CSS override) ?

I'd rather not go thru manually and remove all menu item descriptions, but if necessary...

Steve

Comments

#1

Category:bug report» support request

You are not going to like this answer, but afaict (I could be wrong, but pretty sure I am not) there is no easy way to code your way out of this, because it looks like SF returns a string not structured data, so.... the only way to get rid of these is to manually remove them OR one of two things:

- write some code that removes them from the database, they are not easy to get to because they are in a serialized array in the menu_links table
- override SF theme_superfish_build() function and remove the titles - this is freaking major hacking, its a massive and very complex function that even scares me.

#2

thanks for answering -- even though I didn't hear the answer I'd like...

probably simplest/fastest solution for me would be to manually remove the description text.

Steve

#3

More easy is the js way. add this to your YOURTHEME.js (add YOURTHEME.js to YOURTHEME.info). More information on how to do this ... check YOURTHEME/README.txt

/**
* @JS for YOURTHEME theme.
*/

(function($) {
  /**
   * Behaviors for YOURTHEME theme.
   */
  Drupal.behaviors.YOURTHEME = {
    attach: function (context) {
      var hiddenTitle;
      $(".sf-menu li > a").hover(
        // The mouse pointer enters the element.
        function() {
          //Temporarly store hidden title.
          hiddenTitle = $(this).attr('title');
          //Temporarly remove hidden title.
          $(this).attr('title','');
        },
        // The mouse pointer leaves the element.
        function() {
          // Restore the hidden title.
          $(this).attr('title',hiddenTitle);
        }
      );
    }
  };
})(jQuery);

#4

It Woks, thanks

nobody click here