Disclaimer: I suck at JavaScript. (A lot)
Ok, so I have this:
[code=html] <ul class=”infoTabs”>
<!–
JS:
show(boxid){
//hide (all 3)
//show the selected one
}
–>
<li class=”show” onClick=”show(‘firstinfo’)”>Plat</li>
<li class=”hide” onClick=”show(‘secondinfo’)”>Lots</li>
<li class=”hide” onClick=”show(‘thirdinfo’)”>Misc</li>
</ul>
<div id=”infoTabBox”>
<section class=”show” id=”firstinfo”>
<h3>First Information</h3>
</section>
<section class=”hide” id=”secondinfo”>
<h3>Second Information</h3>
</section>
<section class=”hide” id=”thirdinfo”>
<h3>Third Information</h3>
</section>
</div>
I’d like to click the list items and have them change the class from “show” to “hide” for all 3 of the section-boxes and then take the one that was selected (the ID is the variable that gets passed by those buttons) and change that one to “show”…
Any suggestions?