Bootstrap Q&A Logo
Bootstrap Q&A Part of the Q&A Network
Q&A Logo

How do I sync the active state between a Bootstrap carousel and an accordion?

Asked on Oct 21, 2025

Answer

To sync the active state between a Bootstrap carousel and an accordion, you can use JavaScript to listen for the `slide.bs.carousel` event and update the accordion accordingly. Here's a simple example to demonstrate this concept.

        
        

        

Content for first item.

Content for second item.

Content for third item.