Created
September 11, 2015 22:31
-
-
Save wmeredith/000ba9df84a4ebd75e22 to your computer and use it in GitHub Desktop.
A quick button for collapsing bootstrap panel-body and panel-footer from the panel-heading.
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
$('.bootstrapPanelCollapse').click(function() { | |
var $pBody = $(this).closest('.panel').find('.panel-body'); | |
var $pFooter = $(this).closest('.panel').find('.panel-footer'); | |
$.merge($pBody,$pFooter).slideToggle(); | |
$(this).find('.glyphicon').toggleClass('glyphicon-chevron-down'); | |
$(this).find('.glyphicon').toggleClass('glyphicon-chevron-up'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment