Created
July 14, 2017 16:07
-
-
Save vaporic/148354da36b26f50573d62e8af9d9a8c to your computer and use it in GitHub Desktop.
Accordion with plus/minus icon
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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