Sign Up! Login: Password: New User? Forgot? Support
Forums : Tabs > Menu Tooltips
Mottie (SuperAdmin) 12/27/2011 10:28 AM EST : Menu Tooltips
Posts: 3884



Menu Tooltips

GuildPortal admin site link to the original post

This script adds tooltip message to your Dynamic Images type navigation menu (Control Panel > Navigation Style > Dynamic Images)


Add the following code to you custom code area (Control Panel > Custom HTML & Script > Custom Javascript/jQuery > Document Ready Event tab)
* Add Tooltips to the Dynamic Images type menu
* The tab name (caps matter) goes on the left and the tooltip message
  goes on the right (HTML allowed; use single quotes if needed).
  ,"Tab Name" : "<span style='color:blue'>Tooltip
</span> to add"

* This script requires the modified tooltip mod.

var tooltips = {
     "Home"     : "Go to the Home Page"
    ,"Forums"   : "Read the Forums"
    ,"Calendar" : "Check the Raid Schedule"
    ,"Mail"     : "You've got mail!"
    ,"Roster"   : "" // blank tooltips or unlisted tabs will not get a tooltip

// Don't change anything below
// ***************************

, t, tt, m = $('.straightBarWrapper');
if (m.length) {
        t = $(this);
        tt = tooltips[$.trim(t.find('a').text())];
        if (tt) {
            t.addClass('tooltip').attr('title', tt);

Add the tabs you would like to have a tooltip using this format - note that the first listing does not start with a comma. Tab name is in blue and the tooltip
,"Tab Name" : "<span style='color:blue'>Tooltip</span> to add"
  • Add the "Tab Name" in blue, in quotes on the left. Capitalization and spacing matters.
  • Add the tooltip HTML on the left (in purple). Use single quotes inside the quotes, as needed.
  • Unlisted tabs will not get a tooltip
  • Any tooltip HTML that is empty will not add a tooltip.
Edit (12/31/2011): Modified to add tooltips to the menu made by the Multilevel Dynamic Menu mod.
Characters: Mottie Motty Mortie Ooshiny Mot Fudgems

New posts No new posts
New posts ( popular ) No new posts ( popular )
New posts ( sticky ) No new posts ( sticky )
New posts ( locked ) No new posts ( locked )
Who's Online 
There are   members online.
So-and-so has logged on!