Click here to Skip to main content
15,887,328 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I have a requirement in accordion using javascript.I have 4 accordion elements .inside each element there are multiple sub elements.When after opening the elements when click on Collapse button on top of accordion I should collapse all the opened divs inside the avcccordion.Please explain with an example.

Thanks in advance

What I have tried:

I am tring to close the opened elements in the accordion
Posted
Comments
Sinisa Hajnal 29-Feb-16 6:43am    
There should be option to do it in the accordion itself. Read the documentation. For example, jQuery UI accordion closes all except active element by default.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900