Skip to content
Permalink
Browse files

Accordion: Fixed back-compat for icons.headerSelected when icons opti…

…on is null.
  • Loading branch information...
scottgonzalez committed Nov 16, 2011
1 parent f0f54e3 commit e5464f8f19f2026487bdffb465c6e77498449032
Showing with 5 additions and 3 deletions.
  1. +1 −1 demos/accordion/custom-icons.html
  2. +4 −2 ui/jquery.ui.accordion.js
@@ -20,7 +20,7 @@
icons: icons
});
$( "#toggle" ).button().toggle(function() {
$( "#accordion" ).accordion( "option", "icons", false );
$( "#accordion" ).accordion( "option", "icons", null );
}, function() {
$( "#accordion" ).accordion( "option", "icons", icons );
});
@@ -628,8 +628,10 @@ if ( $.uiBackCompat !== false ) {

var _createIcons = prototype._createIcons;
prototype._createIcons = function() {
this.options.icons.activeHeader = this.options.icons.activeHeader ||
this.options.icons.headerSelected;
if ( this.options.icons ) {
this.options.icons.activeHeader = this.options.icons.activeHeader ||
this.options.icons.headerSelected;
}
_createIcons.call( this );
};
}( jQuery, jQuery.ui.accordion.prototype ) );

0 comments on commit e5464f8

Please sign in to comment.
You can’t perform that action at this time.