Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save jeremysimmons/10d637d90c4549ab7d7a4f7f66d90001 to your computer and use it in GitHub Desktop.
Save jeremysimmons/10d637d90c4549ab7d7a4f7f66d90001 to your computer and use it in GitHub Desktop.
<script type="text/javascript">
$(function() {
$('.collapse').on('show.bs.collapse', function (e) {
$(e.target).siblings("button[data-toggle=collapse]").children("span").removeClass("glyphicon-chevron-down").addClass("glyphicon-chevron-up");
});
$('.collapse').on('hide.bs.collapse', function (e) {
$(e.target).siblings("button[data-toggle=collapse]").children("span").removeClass("glyphicon-chevron-up").addClass("glyphicon-chevron-down");
});
});
</script>
<div class="row">
<button class="btn btn-primary" type="button" data-toggle="collapse" data-target="#collapseExample0" aria-expanded="false" aria-controls="collapseExample">
<span class="glyphicon glyphicon-chevron-down"></span> Button with data-target
</button>
<div class="collapse" id="collapseExample0">
<div class="well">
...
Content Area for 0
...
</div>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment