2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-05-21 13:24:08 +03:00

Rename .active to .show

This commit is contained in:
Starsam80
2016-10-27 16:13:17 -06:00
parent ede925d79b
commit bf39bb3ac3
21 changed files with 121 additions and 121 deletions
+4 -4
View File
@@ -18,7 +18,7 @@ Click the buttons below to show and hide another element via class changes:
- `.collapse` hides content
- `.collapsing` is applied during transitions
- `.collapse.active` shows content
- `.collapse.show` shows content
You can use a link with the `href` attribute, or a button with the `data-target` attribute. In both cases, the `data-toggle="collapse"` is required.
@@ -53,7 +53,7 @@ Extend the default collapse behavior to create an accordion.
</h5>
</div>
<div id="collapseOne" class="collapse active" role="tabpanel" aria-labelledby="headingOne">
<div id="collapseOne" class="collapse show" role="tabpanel" aria-labelledby="headingOne">
<div class="card-block">
Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS.
</div>
@@ -101,14 +101,14 @@ Additionally, if your control element is targeting a single collapsible element
The collapse plugin utilizes a few classes to handle the heavy lifting:
- `.collapse` hides the content
- `.collapse.active` shows the content
- `.collapse.show` shows the content
- `.collapsing` is added when the transition starts, and removed when it finishes
These classes can be found in `_animation.scss`.
### Via data attributes
Just add `data-toggle="collapse"` and a `data-target` to the 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'd like it to default open, add the additional class `active`.
Just add `data-toggle="collapse"` and a `data-target` to the 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'd like it to default open, add the additional class `show`.
To add accordion-like group management to a collapsible control, add the data attribute `data-parent="#selector"`. Refer to the demo to see this in action.