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 #182

In Tab Bar Magic, my root links represent the main pages in a section. I also have the main pages linked in my sub-menus. I would like both the sub-menu link and the root link to highlight when that page is visited.

The Answer

Prepared Apr. 2006 by Al Sparber, PVII

Open your Tab Bar Magic menu script file ( p7tbmenu.js), which is located in p7tbm folder. Locate the function P7_TBMopen and replace it with the revised function listed below.

function P7_TBMopen(){ //v1.0.2 by
var x,i,j,k,kk,wH,tM,tA,pp,cl,a,nd,op,r1,aU;wH=window.location.href;
var mt = new Array(1,'','');if(document.p7TBMop){mt=document.p7TBMop;}op=mt[0];
// tweak to allow last link found
//end tweak
if(tA[j].firstChild.nodeValue==mt[1]){kk=j;}}}if(op==3 && tA[j].href.indexOf(mt[1])>-1){
tA[k].className=(cl&&cl.length>0)?cl+" p7TBMmark":"p7TBMmark";}pp=tA[k].parentNode;
nd='p7TBMt''p7TBMsub','');a=document.getElementById(nd);break;} pp=pp.parentNode;}if(a){P7_TBMdown(a);}} }

Back to the questions list