Created
March 18, 2015 16:01
-
-
Save akkonrad/ed45079a75122d3fe682 to your computer and use it in GitHub Desktop.
Collapsible bug in Bootstrap based themes (Drupal).
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
// Place in theme file, eg. mytheme/js/script.js | |
(function($, Drupal, window, document, undefined) { | |
Drupal.behaviors.bootstrap_based_theme = { | |
attach : function(context, settings) { | |
// Fix collapsible bug. | |
$(".collapse").on("hidden.bs.collapse", function() { | |
if ($(this).hasClass("in")) { | |
$(this).removeClass("in"); | |
} | |
}); | |
} | |
}; | |
})(jQuery, Drupal, this, this.document); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment