What is the purpose of the 'data-parent' attribute in Bootstrap's accordion component?

  • It defines the parent accordion container
  • It specifies the parent element to be collapsed
  • It sets the accordion's parent ID
  • It controls the accordion's nesting level
The 'data-parent' attribute in Bootstrap's accordion component is used to specify the parent element to be collapsed when a particular accordion item is expanded. This attribute helps in creating a hierarchical structure for accordion items, allowing you to control the accordion's behavior in relation to its parent elements.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *