I have this code: CSS:
.hiddenlinks{display: none;}
HTML:
<div id="expand">
<a href="javascript://" class="business" >123</a>
<div class="hiddenlinks">
<a href="/"target="_blank" class="business" style="color:#f36523">ABC</a><br />
<a href="/"target="_blank" class="business" style="color:#f36523">DEF</a><br />
<a href="/"target="_blank" class="business" style="color:#f36523">HIJ</a>
</div>
</div>
There is a list of similar div ids in a vertical order. What I am trying to do is once "123" is clicked, the divs id under #expand will shift down and the "ABC", "DEF", and "HIJ" will display:block.
So my question is a two parter:
- How can i toggle display block and none on click with this html?
- Is there a way to animate the separation of the div id's once .hiddenlinks goes from display:none to display:block. and also when .hiddenlinks goes back to display:none and the div ids close the gap.