<!-- Using jQuery UI Widget: Accordion -->
<head>
<link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
<script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
<script>
$(function() {
$( "#accordion" ).accordion();
});
</script>
</head>
<body>
<div id="accordion">
<h3>Section 1</h3>
<div>
<p>
Text for Section 1
</p>
</div>
<h3>Section 2</h3>
<div>
<p>
Text for Section 2
</p>
</div>
<h3>Section 3</h3>
<div>
<p>
Text for Section 3
</p>
</div>
<h3>Section 4</h3>
<div>
<p>
Text for Section 4
</p>
</div>
</div>
</body>
<!-- This example uses Bootstrap data-toggle attribute
You can use a link with the href attribute, or a button with the data-target attribute. In both cases, the data-toggle="collapse" is required.
-->
<a class="btn btn-primary" data-toggle="collapse" href="#collapseExample" aria-expanded="false" aria-controls="collapseExample">
Link with href
</a>
<button class="btn btn-primary" type="button" data-toggle="collapse" data-target="#collapseExample" aria-expanded="false" aria-controls="collapseExample">
Button with data-target
</button>
<div class="collapse" id="collapseExample">
<div class="well">
Some text here
<br>
More text here
</div>
</div>