Scroll To Top

Enter a query to search our site. Note that you can use "*" and "?" as wildcards. Enclosing more than one word in double quotes ("CSS Layout") will search for the exact phrase.

PVII Knowledge Base

1. Select a product ...
2. Select category ...
3. Search the Knowledge Base...

Question #179

Is there a way to have the Tab Bar Magic menu show the sub menu only when the user clicks on the trigger button instead of mouse over?

The Answer

Prepared Dec. 2005 by Gerry Jacobsen, PVII

The Tab Bar Magic system is designed to show the submenu when the user mouses over the root menu links. If you want to disable the mouse over action and have the menu just show the sub menu when the user clicks the root link you'll need to apply a small tweak the JavaScript code.

Here's how:

1. Open the p7tbmenu.js JavaScript file.

2. Locate the first line of code in the P7_TBMover() function at line 42, it will look like this:

 if(!document.p7tbmf){return;}if(document.p7TBMtm){clearTimeout(document.p7TBMtm);}P7_TBMswp(a);
 if(p7tbma[0]==1){document.p7TBMtm=setTimeout("P7_TBMshow('"+a.id+"')",p7tbma[4]);

3. Create a new line after this first line, and paste this into that new line:

 return;

so it now looks like this:

 if(!document.p7tbmf){return;}if(document.p7TBMtm){clearTimeout(document.p7TBMtm);}P7_TBMswp(a);
 return;
 if(p7tbma[0]==1){document.p7TBMtm=setTimeout("P7_TBMshow('"+a.id+"')",p7tbma[4]); 

4. Save the file.

That's it! The system will only show the submenu when the user clicks on a trigger button, but still retain all of the root hover styles.

Back to the questions list