I'm using javascript from the advanced guide for my product menu and want to colour-code each section differently on crazywire.beechdev.co.uk
Here's my current menu code:
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
<!--
function SectionList(ar)
{
var strIDs = '<table border=0 width=95% cols=1>';
for (var i=1;i<=ar.length;i++)
{
if (ar[i].sURL !=null)
{
strIDs += '<tr><td><div class="TMC-sidehead"><a href="' + ar[i].sURL + '">' + ar[i].sName + '<img border="0" style="padding-left: 7px;padding-bottom: 2px;" src="arrow.png"/></div></a></td></tr>';
{
if (ar[i].pChild)
{
for (var j=1;j<=ar[i].pChild.length;j++)
{
if (j <= ar[i].pChild.length)
{
strIDs += '<tr><td><div id="TMC-sidesub"><a href="' + ar[i].pChild[j].sURL + '">' + ar[i].pChild[j].sName + '</div></a></td></tr>';
}
}
}
}
}
}
strIDs += '</table>'
return strIDs
}
//-->
</SCRIPT>
I need this line to change for each top level section so I can specify a unique underline colour and arrow image.
strIDs += '<tr><td><div class="TMC-sidehead"><a href="' + ar[i].sURL + '">' + ar[i].sName + '<img border="0" style="padding-left: 7px;padding-bottom: 2px;" src="arrow.png"/></div></a></td></tr>';
I've attached an image of what I want the menu to look like...
Is there any way of doing this?
Thanks :-)
Here's my current menu code:
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
<!--
function SectionList(ar)
{
var strIDs = '<table border=0 width=95% cols=1>';
for (var i=1;i<=ar.length;i++)
{
if (ar[i].sURL !=null)
{
strIDs += '<tr><td><div class="TMC-sidehead"><a href="' + ar[i].sURL + '">' + ar[i].sName + '<img border="0" style="padding-left: 7px;padding-bottom: 2px;" src="arrow.png"/></div></a></td></tr>';
{
if (ar[i].pChild)
{
for (var j=1;j<=ar[i].pChild.length;j++)
{
if (j <= ar[i].pChild.length)
{
strIDs += '<tr><td><div id="TMC-sidesub"><a href="' + ar[i].pChild[j].sURL + '">' + ar[i].pChild[j].sName + '</div></a></td></tr>';
}
}
}
}
}
}
strIDs += '</table>'
return strIDs
}
//-->
</SCRIPT>
I need this line to change for each top level section so I can specify a unique underline colour and arrow image.
strIDs += '<tr><td><div class="TMC-sidehead"><a href="' + ar[i].sURL + '">' + ar[i].sName + '<img border="0" style="padding-left: 7px;padding-bottom: 2px;" src="arrow.png"/></div></a></td></tr>';
I've attached an image of what I want the menu to look like...
Is there any way of doing this?
Thanks :-)
Comment