-
-
Save samsonradu/8841052 to your computer and use it in GitHub Desktop.
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
this.$palettes.on('hidden.bs.collapse', function (e) { | |
var $this = $(this), | |
targetPage = $target.attr('id').slice(0, -6), | |
$target = $(e.target); | |
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), | |
$expandCollapseIcons = find('.accordion-toggle span[itemprop="expandCollapseIcons"] i'); | |
var $span = $("span[itemprop=expandCollapseIcons]"); | |
var $i = $("span[itemprop=expandCollapseIcons] i"); | |
// It's the $i who has class "icon-chevron-down" so | |
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'); | |
} | |
if (targetPage === 'styles') | |
return; | |
if (iframe.jQuery) | |
iframe.jQuery.mobile.changePage('#' + targetPage); | |
self.$pageMarker.val(targetPage); | |
}); | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment