[jQuery] Linking each list item to respective div container.
Hi there, I just started to working on jQuery and am finding it
extremely easy to use. However I've been trying to find a solution to
a simple navigation problem here..
My markup has a list with a few 'li' items. So for each click on a
list item it would show the respective div container and hide the
rest...
<!-- List Menu -->
<div id="dropbox">
<ul>
<li>Cash</li>
<li>Personal Assets</li>
<li>Certificates of Deposit</li>
</ul>
</div>
<!-- Div Containers -->
<div class="formcash">
<h2>Cash</h2>
</div>
<div class="formpersonal">
<h2>Personal Assets</h2>
</div>
<div class="formdeposit">
<h2>Certificates of Deposit </h2>
</div>
Can I some how do the toggle without naming ids and classes?
Any ideas people?