Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo.
Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo.
Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo.
Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo.
[Try it Β»](#)
The result is as follows:

As you can see in the example, we created a collapsible component. Unlike the accordion, we did not add the **data-parent** attribute.
## Usage
The following table lists the classes used by the Collapse plugin to handle the heavy lifting of expanding/collapsing:
| Class | Description | Example |
| --- | --- | --- |
| .collapse | Hides the content. | (#) |
| .collapse.in | Shows the content. | (#) |
| .collapsing | Added when a transition begins, removed when it completes. | |
You can use the Collapse plugin in two ways:
* **Via data attributes**: Add **data-toggle="collapse"** and a **data-target** to an element to automatically assign control of a collapsible element. The **data-target** attribute accepts a CSS selector to apply the collapse to. Be sure to add the class **.collapse** to the collapsible element. If you want it to be open by default, add the additional class **.in**.
To add accordion-like group management to a collapsible control, add the data attribute **data-parent="#selector"**.
* **Via JavaScript**: The collapse method can be activated via JavaScript, as follows: $('.collapse').collapse()
## Options
Some options can be passed via data attributes or JavaScript. The following table lists these options:
| Option Name | Type/Default Value | Data Attribute Name | Description |
| --- | --- | --- | --- |
| parent | selector _Default: false_ | data-parent | If a selector is provided, all collapsible elements under the specified parent will be closed when this collapsible item is shown. This is analogous to the traditional accordion behavior - it relies on the accordion-group class. |
| toggle | boolean _Default: true_ | data-toggle | Toggles the collapsible element on invocation. |
## Methods
Here are some useful methods of the Collapse plugin:
| Method | Description | Example |
| --- | --- | --- |
| **Options:** .collapse(options) | Activates content as a collapsible element. Accepts an optional options object. | $('#identifier').collapse({toggle: false}) |
| **Toggle:** .collapse('toggle') | Toggles the display/hide of a collapsible element. | $('#identifier').collapse('toggle') |
| **Show:** .collapse('show') | Shows a collapsible element. | $('#identifier').collapse('show') |
| **Hide:** .collapse('hide') | Hides a collapsible element. | $('#identifier').collapse('hide') |
### Example
The following example demonstrates the usage of the methods:
## Example
Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo.
Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo.
Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo.
Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo.
Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo.
YouTip