Skip to content

Instantly share code, notes, and snippets.

@vaporic
Created July 14, 2017 16:07
Show Gist options
  • Save vaporic/148354da36b26f50573d62e8af9d9a8c to your computer and use it in GitHub Desktop.
Save vaporic/148354da36b26f50573d62e8af9d9a8c to your computer and use it in GitHub Desktop.
Accordion with plus/minus icon
function toggleIcon(e) {
$(e.target)
.prev('.panel-heading')
.find(".more-less")
.toggleClass('glyphicon-plus glyphicon-minus');
}
$('.panel-group').on('hidden.bs.collapse', toggleIcon);
$('.panel-group').on('shown.bs.collapse', toggleIcon);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment