View Single Post
02-17-2006, 05:54 AM
#1
bcd is offline bcd
bcd's Avatar
Status: Junior Member
Join date: Oct 2005
Location: Cali
Expertise:
Software:
 
Posts: 96
iTrader: 0 / 0%
 

bcd is on a distinguished road

Send a message via AIM to bcd Send a message via MSN to bcd Send a message via Yahoo to bcd

  Old  New to Javascript, have a very simple question

And I pray the answer will be as simple

Here's the situation: I have five unordered lists, each with a class of "hidden", and each with syntax like this (id increments accordingly for each list):
Code:
<ul id="list1" class="hidden">
<li><a href="#" name="1"> Choice 1 </a></li>
<li><a href="#" name="2"> Choice 2 </a></li>
<li><a href="#" name="3"> Choice 3 </a></li>
</ul>
I also have a couple links (on the same page), which, when pressed, need to (1) change the corresponding list's class to "visible" and (2) go to the appropriate anchor tag. The links will have code based on this:
Code:
<a href="#1"> Choice 1 </a>
My problem is that I have no idea how to code this with Javascript. Any help would be greatly appreciated