I\'ve set up this simple version of the Bootstrap accordion:
Simple accordion: http://jsfiddle.net/darrenc/cngPS/
Currently the icon only po
Shortest possible answer.
HTML
<a data-toggle="collapse" data-parent="#panel-quote-group" href="#collapseQuote">
<span class="toggle-icon glyphicon glyphicon-collapse-up"></span>
</a>
JS:
<script type="text/javascript">
$(function () {
$('a[data-toggle="collapse"]').click(function () {
$(this).find('span.toggle-icon').toggleClass('glyphicon-collapse-up glyphicon-collapse-down');
})
})
</script>
And of course, you can use anything for a selector instead of anchor tag a
and you can also use specific selector instead of this
if your icon lies outside your clicked element.