Results 1 to 2 of 2

Thread: arrowlistmenu question

  1. #1
    Join Date
    Apr 2008
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default arrowlistmenu question

    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?

  2. #2
    Join Date
    Feb 2008
    Location
    Cebu City Philippines
    Posts
    1,160
    Thanks
    17
    Thanked 277 Times in 275 Posts

    Default

    Which lists do you mean?!..This list:
    Code:
    <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,
    Code:
    <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:
    Code:
    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';
    		}
        }
       }
      }
      }
    Edit:
    Last step, add the function in your onload attribute
    Code:
    <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
    Last edited by rangana; 04-02-2008 at 08:27 AM. Reason: Added the last step
    Learn how to code at 02geek

    The more you learn, the more you'll realize there's much more to learn
    Ray.ph!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •