I'm struggling to incorporate a Bootstrap accordion collapse feature into my project, specifically with the auto-collapsing functionality. In the scenario where there are 3 divs labeled A, B, and C, if A is open and I click on B, A should automatically collapse, yet it doesn't. My goal is to have only one section open at a time.
Despite repeatedly reviewing my code and consulting various tutorials and resources, I am still unable to get it to work. Any assistance provided would be greatly appreciated.
You can view the fiddle here: https://jsfiddle.net/3ap18Lda/1/
<script src="https://code.jquery.com/jquery.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<!-- Accordion -->
<div class="container">
<div id="accordion" role="tablist" aria-multiselectable="true">
<div class="row caracteristicas-table">
<div class="col-sm-12">
<div role="tab" id="headingOne">
<h3 class="dark-grey">HERE GOES THE TITLE</h3>
<span class="orange-line"></span>
<h4>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec condimentum pharetra ligula, non varius diam feugiat dignissim. Cras tellus quam, facilisis eget imperdiet eu, fermentum non justo. </h4>
<a data-toggle="collapse" data-parent="#accordion" href="#collapseOne" aria-expanded="true" aria-controls="collapseOne">
<i class="down-arrow"><img src="images/down-arrow.svg"></i><h4 class="text-quero-mais">I want to know some more</h4>
</a>
</div> <!-- / tab -->
<div id="collapseOne" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingOne">
<h4>Mauris vel ante eu tortor vulputate congue eu eget nibh. Suspendisse malesuada vehicula felis, vel sodales diam interdum eu. Etiam eu ante egestas, elementum nulla nec, gravida felis.</h4>
</div> <!-- / collaspeOne -->
</div><!-- / col -->
</div> <!-- / row -->
<div class="row caracteristicas-table">
<div class="col-sm-12">
<div role="tab" id="headingTwo">
<h3 class="dark-grey">HERE GOES THE TITLE</h3>
<span class="orange-line"></span>
<h4>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec condimentum pharetra ligula, non varius diam feugiat dignissim. Cras tellus quam, facilisis eget imperdiet eu, fermentum non justo.</h4>
<a class="collapsed" data-toggle="collapse" data-parent="#accordion" href="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo">
<i class="down-arrow"><img src="images/down-arrow.svg"></i><h4 class="text-quero-mais">I want to know some more</h4>
</a>
</div> <!-- / tab -->
<div id="collapseTwo" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingTwo">
<h4>Mauris vel ante eu tortor vulputate congue eu eget nibh. Suspendisse malesuada vehicula felis, vel sodales diam interdum eu. Etiam eu ante egestas, elementum nulla nec, gravida felis.</h4>
</div> <!-- / collaspeTwo -->
</div><!-- / col -->
</div> <!-- / row -->
<div class="row caracteristicas-table">
<div class="col-sm-12">
<div role="tab" id="headingThree">
<h3 class="dark-grey">HERE GOES THE TITLE</h3>
<span class="orange-line"></span>
<h4>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec condimentum pharetra ligula, non varius diam feugiat dignissim. Cras tellus quam, facilisis eget imperdiet eu, fermentum non justo. </h4>
<a class="collapsed" data-toggle="collapse" data-parent="#accordion" href="#collapseThree" aria-expanded="false" aria-controls="collapseThree">
<i class="down-arrow"><img src="images/down-arrow.svg"></i><h4 class="text-quero-mais">I want to know some more</h4>
</a>
</div> <!-- / tab -->
<div id="collapseThree" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingThree">
<h4>Mauris vel ante eu tortor vulputate congue eu eget nibh. Suspendisse malesuada vehicula felis, vel sodales diam interdum eu. Etiam eu ante egestas, elementum nulla nec, gravida felis.</h4>
</div> <!-- / collaspeThree -->
</div><!-- / col -->
</div> <!-- / row -->
</div> <!-- / accordion -->
</div> <!-- / container -->
Thank you!