I have a fully working JQuery accordion except for the fact that I want to have the ability to have all the sections open. To achieve this an user must be able to open a section without the other one's collapsing.
This is a bit counterintuitive, but a real-life accordion can also be expanded to it's full extend.
$(document).ready(function() {
$("#accordion").accordion({
heightStyle: 'content',
collapsible: true,
toggle: false
});
});
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://code.jquery.com/ui/1.12.0/jquery-ui.min.js"></script>
<link rel="stylesheet" href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
<div id="accordion">
<h3>Section 1</h3>
<div>
A
</div>
<h3>Section 2</h3>
<div>
B
</div>
<h3>Section 3</h3>
<div>
C
</div>
<h3>Section 4</h3>
<div>
D
</div>
</div>
JS Fiddle: https://jsfiddle.net/xu9d53ta/
How would I achieve this?
Try this:
Fiddle link: https://jsfiddle.net/s5hAw/1091/
Credits: https://stackoverflow.com/a/43445385/13695248