Last active
January 2, 2016 09:48
-
-
Save orangexception/8285123 to your computer and use it in GitHub Desktop.
A short fix for latest Bootstrap's collapsable accordions in IE7+.
This file contains hidden or 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
// Bootstrap IE Collapsable Accordion Issue | |
if( $.browser.msie ) { | |
// Accordion Toggle Click Handler | |
$( ".accordion-toggle" ).click( function() { | |
// Get Accodion Root | |
domAccordion= $( this ).parents( ".panel-group" ); | |
// Hide All Collapsable | |
domAccordion.children( ".collpase" ).removeClass( "in" ); | |
// Collapse All Buttons | |
domAccordion.children( ".accordion-toggle" ).addClass( "collapsed" ); | |
// Remove Collapsed Button | |
$( this ).removeClass( "collapsed" ); | |
// Show Selected | |
$( $( this ).attr( "href" ) ) | |
.addClass( "in" ) | |
.css( "height" , "auto" ); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment