I'm trying to create a script/flow. I'd like to use jQuery to swap html elements (12 total divs) and stay in one, centered and responsive section element. The first div is visible and the rest hidden. In each div, and not in a static button list, there would be links that let you hide the current div, and unhide another div based on its id.
JQuery Toggle seems to be the most easy, but I'm not figuring out how to toggle more than 2 elements. I'm open to any solutions, however.
<section>
<div id="a">
<p>content here</p>
<div class="links">
<a href="#" id="b-link">b</a> <a href="#" id="c-link">c</a>
</div>
</div>
<div class="hidden" id="b">
<p>content here</p>
<div class="links">
<a href="#" id="a-link">a</a> <a href="#" id="c-link">c</a>
<a href="#" id="d-link">d</a>
</div>
</div>
<div class="hidden" id="c">
<p>content here</p>
<div class="links">
<a href="#" id="a-link">a</a> <a href="#" id="b-link">b</a>
</div>
</div>
<div class="hidden" id="d">
<p>content here</p>
<div class="links">
<a href="#" id="a-link">c</a> <a href="#" id="b-link">a</a>
</div>
</div>
</section>
#linkelements. Ids mus be unique in the dom. 2. Where is your attempted script ? - Gabriele Petrioli