I have a series of links nested within a div. When one of those links is clicked, I'd like to hide the div with the link that was clicked and show another div. Then, if a link is clicked within that div, I'd like to change the div to yet another div.
The html looks like this:
<div id="main">
<div class="item"><a href="">Link to div A</a></div>
<div class="item"><a href="">Link to div B</a></div>
<div class="item"><a href="">Link to div C</a></div>
</div>
<div id="a" style="display:none;">Link to div <a href="">B</a> and <a href="">C</a></div>
<div id="b" style="display:none;">Link to div <a href="">A</a> and <a href="">C</a></div>
<div id="c" style="display:none;">Link to div <a href="">A</a> and <a href="">B</a></div>
I'm getting a little tripped up with the jQuery on this one. Does anyone have any advice on how to get this working with jQuery? Showing/hiding a div seems straight forward, but doing that again within the divs is confusing me.
Thanks!