Boostrap 4 dropdown Accordion Navigation

I’m creating a dropdown accordion style in bootstrap 4 and found this useful solution using JavaScript in stack overflow. I modified the script to suit my website navigation style but I got stuck on how to make the JavaScript find not only ID: accordion but also ID: accordion1 and so on. Thus, when I navigate out of the menu, the accordion that open will automatically hide. Currently, the script can only hide the first panel which is ID: accordion. For this project, I can’t use form tag. Sample in Bootply

I’m blur…just change the data accordion will do. however, how do I make the accordion panels open in multiples for my navigation menu?

You need to specify the correct IDs here


This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.