PDA

View Full Version : Tab Menu Problem



skywalker
10-20-2006, 12:59 PM
1) Script Title:
Tab Menu

2) Script URL (on DD):
http://www.dynamicdrive.com/style/csslibrary/item/css-tabs-menu/

3) Describe problem:
I can't rememeber if the script URL is the correct one.
I have attached the tabmenu.js and tabdiv.css. See attached zip file
The problem is:

After display the tab menu, the font color on the tab is displayed initially as white color. After clicking the first time, it will turn blue color (I think it is the HTML Link color), then I click again, it will turn to white, and then subsequently, it will always be white regardless how many click.

Why like this ?

How to ensure that the click on the tab will not use the html link color ?
Can anyone give me some hints ? :confused:


My code is like this:

function cleartab1()
{
document.getElementById('_sc1').style.background = '#6699CC';
}
function cleartab2()
{
document.getElementById('_sc2').style.background = '#6699CC';
}

function highlighttab1()
{
expandcontent('sc1',this)
document.getElementById('_sc1').style.background = '#003366';
}

function highlighttab2()
{
expandcontent('sc2',this)
document.getElementById('_sc2').style.background = '#003366';
}

<UL ID="tablist">
<li><a href="#" id="_sc1" onclick="expandcontent('sc1', this);cleartab2(); highlighttab1();">First Tab</a></li>
<li style="visibility:hidden"><a href="#" id="_sc2" onclick="expandcontent('sc2', this); cleartab1(); highlighttab2(); Request('option');">Second Tab</a></li>

</UL>


<DIV class="scroll" ID="tabbg" style="width:760px; height:520px;">
<div id="sc1" class="tabcontent">
Something text here

</div>

<div id="sc2" class="tabcontent">
another text here
</div>

</DIV>