Help please!
I'm creating a FAQs webpage where theres approx 50 questions. Therefore, I'm using collapsible divs so that the page isn't too long. Below is the code I've used so far.
I'm wondering if its possible to have a hyperlink (e.g. /#question20) where I can jump to a particular div which is automatically expanded by clicking on the hyperlink?
Also, what would be the best way of creating expand all / collapse all buttons?
Thanks in advance!
<div class="panel-group" style="width: 70%; float: right; min-width: 300px;">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title"><strong><a href="#collapse1" data-toggle="collapse">Question 1</a></strong></h3>
</div>
<div id="collapse1" class="panel-collapse collapse">
<div class="panel-body">Answer 1</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title"><strong><a href="#collapse2" data-toggle="collapse">Question 2</a></strong></h3>
</div>
<div id="collapse2" class="panel-collapse collapse">
<div class="panel-body">Answer 2</div>
</div>
</div>