Well, the general idea would be to add another function that loops through every link within the desired sub level container (ie: <div id="ct2" class="tabcontent">..</div>), and highlight the desired link by giving it an ID of "current". Try adding the below to the very end of ddtabmenu.js:
Code:
ddtabmenu._selectsub=function(sublevel, dselected){
var submenus=document.getElementById(sublevel).getElementsByTagName('a')
for (var i=0; i<submenus.length; i++){
if (i==dselected)
submenus[i].className="current"
}
}
ddtabmenu.selectsub=function(sublevel, dselected){
this.addEvent(window, function(){ddtabmenu._selectsub(sublevel, dselected)}, "load")
}
Then following your original code to initialize the menu, add the below to also highlight of of the sub menu links:
Code:
ddtabmenu.definemenu("ddtabs", "auto") //initialize Tab Menu #4 with 1st tab selected
ddtabmenu.selectsub('ct2', 2)
Here I'm saying highlight the 3rd link within the sub menu DIV with ID=ct2.
Bookmarks