Skip to content

Instantly share code, notes, and snippets.

@richjenks
Last active June 22, 2016 12:59
Show Gist options
  • Save richjenks/fd215d77b7e566458dc0c6e14f00d6aa to your computer and use it in GitHub Desktop.
Save richjenks/fd215d77b7e566458dc0c6e14f00d6aa to your computer and use it in GitHub Desktop.
Bootstrap style to have hide/show content of collapse toggle based on current state
[aria-expanded="false"] .collapse-opened,
[aria-expanded="true"] .collapse-closed {
display: none;
}
<a role="button" data-toggle="collapse" href="#collapseId" aria-expanded="false" aria-controls="collapseId">
<i class="fa fa-lg fa-caret-left collapse-closed"></i>
<i class="fa fa-lg fa-caret-down collapse-opened"></i>
</a>
<div id="collapseId" class="collapse">
Content
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment