Is there a way to use javascript to change/update a class depending upon a click?
For example:
INITIAL HTML
[HTML]<h1 class="superhead">TODDLER</h1>
<ul class="extended">
<li>Sneakers</li>
<li>Dress shoes</li>
<li>Tap / Ballet </li>
<li>Atheletic</li>
</ul>
<h1 class="superhead">KIDS (6 - 7)</h1>
<ul>
<li>Sneakers</li>
<li>Dress shoes</li>
<li>Tap / Ballet </li>
<li>Atheletic</li>
</ul>
<h1 class="superhead">KIDS (8 - 10)</h1>
<ul>
<li>Sneakers</li>
<li>Dress shoes</li>
<li>Tap / Ballet </li>
<li>Atheletic</li>
</ul>
<h1 class="superhead">KIDS (11 - 12)</h1>
<ul>
<li>Sneakers</li>
<li>Dress shoes</li>
<li>Tap / Ballet </li>
<li>Atheletic</li>
</ul>[/HTML]
Clicking on KIDS (6 -7) will produce:
[HTML]<h1 class="superhead">TODDLER</h1>
<ul>
<li>Sneakers</li>
<li>Dress shoes</li>
<li>Tap / Ballet </li>
<li>Atheletic</li>
</ul>
<h1 class="superhead">KIDS (6 - 7)</h1> <!-- CLICK ON H1 ELEMENT -->
<ul class="extended"> <!-- AND THE UL CLASS CHANGES FOR BOTH THIS ONE AND THE TODDLER ONE -->
<li>Sneakers</li>
<li>Dress shoes</li>
<li>Tap / Ballet </li>
<li>Atheletic</li>
</ul>
<h1 class="superhead">KIDS (8 - 10)</h1>
<ul>
<li>Sneakers</li>
<li>Dress shoes</li>
<li>Tap / Ballet </li>
<li>Atheletic</li>
</ul>
<h1 class="superhead">KIDS (11 - 12)</h1>
<ul>
<li>Sneakers</li>
<li>Dress shoes</li>
<li>Tap / Ballet </li>
<li>Atheletic</li>
</ul>[/HTML]
Then, you click on KIDS (11 - 12) and you get this:
[HTML]<h1 class="superhead">TODDLER</h1>
<ul>
<li>Sneakers</li>
<li>Dress shoes</li>
<li>Tap / Ballet </li>
<li>Atheletic</li>
</ul>
<h1 class="superhead">KIDS (6 - 7)</h1>
<ul>
<li>Sneakers</li>
<li>Dress shoes</li>
<li>Tap / Ballet </li>
<li>Atheletic</li>
</ul>
<h1 class="superhead">KIDS (8 - 10)</h1>
<ul>
<li>Sneakers</li>
<li>Dress shoes</li>
<li>Tap / Ballet </li>
<li>Atheletic</li>
</ul>
<h1 class="superhead">KIDS (11 - 12)</h1>
<ul class="extended">
<li>Sneakers</li>
<li>Dress shoes</li>
<li>Tap / Ballet </li>
<li>Atheletic</li>
</ul>[/HTML]
...... and so on.