javascript - first element not collapsing in bootstrap -
i using collapse using bootstrap.i trying collapse first element not working.here's code
<li class="c-bg-before-yellow list-group-item c-dropdown" style="font-size: 16px;font-weight:500;"> <a class="analytics collapsed" role="button" data-toggle="collapse" href="#collapseexample" aria-expanded="false" aria-controls="collapseexample">audit & assurance</a> <div class="collapse" id="collapseexample" aria-expanded="false" style="height: 0px;"> <ul class="c-dropdown-menu c-content-list-1 c-theme c-square listsss"> <li class="c-bg-before-yellow"> <a href="external_audits.php" class="">external audits</a> </li> <li class="c-bg-before-yellow"> <a href="internal_audits.php" class=" ">internal audits</a> </li> <li class="c-bg-before-yellow"> <a href="rera_audits.php" class=" ">rera audits</a> </li> <li class="c-bg-before-yellow"> <a href="agreed_upon_procedures.php" class=" ">agreed upon procedures</a> </li> </ul> </div> </li>
by default, auto-expanded.you need use accordion.
<ul> <li class="accordion" id="accordion2"> <div class="accordion-group"> <div class="accordion-heading"> <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapseone"> audit & assurance </a> </div> <div id="collapseone" class="accordion-body collapse in"> <div class="accordion-inner"> <ul class="c-dropdown-menu c-content-list-1 c-theme c-square listsss"> <li class="c-bg-before-yellow"> <a href="external_audits.php" class="">external audits</a> </li> <li class="c-bg-before-yellow"> <a href="internal_audits.php" class=" ">internal audits</a> </li> <li class="c-bg-before-yellow"> <a href="rera_audits.php" class=" ">rera audits</a> </li> <li class="c-bg-before-yellow"> <a href="agreed_upon_procedures.php" class=" ">agreed upon procedures</a> </li> </ul> </div> </div> </div> </<li> </ul>
Comments
Post a Comment