is there any option to collapse all the accordion when click on open or any other heading ?
for example click one the second heading all accordion should collapse. is it possible ?
Your main issue is with your accordion-toggle
links.
<a class="accordion-toggle" data-toggle="collapse" data-target="#collapseOne" href="#">
Should be
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion" href="#collapseOne">
Notice the data-target
is not needed it instead goes into the href
but the data-parent
is added. Needs to be done for all three links.
Example
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.