Log in

View Full Version : arrowlistmenu question



gurlskout
04-02-2008, 07:12 AM
I'm using the arrowlist vertical menu and all I want to do is when the user selects a menu option and it takes you to that page, I want that menu item to be a different color on it's own page. So the user knows what page their looking at.

This is the page I'm working on: http://www.opscolorado.com/index2.html

I've been working with this for a bit and can't seem to get it right. I get close, but that's it.

Can anyone help?

rangana
04-02-2008, 07:47 AM
Which lists do you mean?!..This list:


<ul>
<li><a href="insurance.html">Insurance</a></li>
<li><a href="OPSftcollins.html">OPS Fort Collins</a></li>
<li><a href="OPSpueblo.html">OPS Pueblo</a></li>
<li><a href="OPSlakewood.html">OPS Lakewood</a></li>
<li><a href="OPSlongmont.html">OPS Longmont</a></li>
<li><a href="links.html">Links</a></li>
<li><a href="accredited.html">Accreditation</a></li>
</ul>


If so, then you could do it with CSS using the active pseudo, but with my test, it does'nt work on FF, and Opera ;)

Give this edition a try. Add an id on your ul tag, say list,


<ul id="list">
<li><a href="insurance.html">Insurance</a></li>
<li><a href="OPSftcollins.html">OPS Fort Collins</a></li>
<li><a href="OPSpueblo.html">OPS Pueblo</a></li>
<li><a href="OPSlakewood.html">OPS Lakewood</a></li>
<li><a href="OPSlongmont.html">OPS Longmont</a></li>
<li><a href="links.html">Links</a></li>
<li><a href="accredited.html">Accreditation</a></li>
</ul>


...then add this script in your JS:


function linkme()
{
var accept=document.getElementById('list').getElementsByTagName('a');
for(var start=0;start<accept.length;start++)
{
accept[start].onclick=function()
{
for(var start=0;start<accept.length;start++)
{
accept[start].style.color='#fff';
{
this.style.color='#f00';
}
}
}
}
}


Last step, add the function in your onload attribute :)


<body onload="MM_preloadImages('images/home_on.gif','images/whoweare_on.gif','images/whatwedo_on.gif','images/locations_on.gif','images/forms_on.gif');linkme()">


See if it helps ;)