Skip to content

Instantly share code, notes, and snippets.

@mteichtahl
Created February 6, 2014 09:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save mteichtahl/8841215 to your computer and use it in GitHub Desktop.
Save mteichtahl/8841215 to your computer and use it in GitHub Desktop.
this.$palettes.on('hidden.bs.collapse', function (e) {
var $this = $(this),
$target = $(e.target),
targetPage = $target.attr('id').slice(0, -6);
var $i = $("span[itemprop=expandCollapseIcons] i", $(targetPage + "-panel"));
if ($i.hasClass('icon-chevron-down')) {
$i.removeClass('icon-chevron-down').addClass('icon-chevron-up');
} else {
$i.removeClass('icon-chevron-up').addClass('icon-chevron-down');
}
});
this.$palettes.on('show.bs.collapse', function (e) {
var iframe = self.iframe(),
$iframe = $(iframe.document),
$this = $(this),
$target = $(e.target),
targetPage = $target.attr('id').slice(0, -6);
var $i = $("span[itemprop=expandCollapseIcons] i", $(targetPage + "-panel"));
if ($i.hasClass('icon-chevron-up')) {
$i.removeClass('icon-chevron-up').addClass('icon-chevron-down');
} else {
$i.removeClass('icon-chevron-down').addClass('icon-chevron-up');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment