Sounds like you don't need an accordion, which has multiple panels, only one of which can open at a time. Instead, just use collapse
which allows you to toggle the visibility of a section of the page.
Panel Visibility
From the collapse docs:
The collapse plugin utilizes a few classes to handle the heavy lifting:
.collapse
hides the content
.collapse.in
shows the content
.collapsing
is added when the transition starts, and removed when it finishes
Thus, to start off collapsed, just make sure your extra content has the class collapse
and not in
Simple HTML
To use collapse, you really just need to specify a data-toggle="collapse"
and then point the collapse to the css selector of the section you would like to toggle using data-target
.
Here's a bare bones example that just exposes the collapsing functionality:
<pre><code><a data-toggle="collapse" <b>data-target="#ReadMoreInfo"</b> href="#">
Read More / Less
</a>
<div <b>id="ReadMoreInfo"</b> class="collapse">
<p> More Info Here </p>
</div>
</code></pre>
HTML with Bootstrap classes
All the other bootstrap classes are just to help make the collapsible panel look like a collapsible panel. I would recommend formatting them like this or doing a lot of custom CSS work. Even if you wanted to do the CSS yourself, starting off with this template and then overriding the styles would be best.
<pre><code><div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">
<a data-toggle="collapse"
<b>data-target="#ReadMoreInfo"</b>
href="#ReadMoreInfo">
Read More / Less
</a>
</h4>
</div>
<div <b>id="ReadMoreInfo"</b> class="panel-collapse collapse">
<div class="panel-body">
<p>more info.</p>
<h4 class="title">More titles</h4>
<p>more content</p>
</div>
</div>
</div>
</code></pre>
Screenshot: