Skip to content
Permalink
Browse files

Accordion: Don't toggle icons if the accordion doesn't have icons.

  • Loading branch information...
scottgonzalez committed Feb 27, 2012
1 parent 367da95 commit 7f533dfb44f9d6807a5526aa7554f0806c544b69
Showing with 10 additions and 4 deletions.
  1. +10 −4 ui/jquery.ui.accordion.js
@@ -347,17 +347,23 @@ $.widget( "ui.accordion", {
// switch classes
active
.removeClass( "ui-accordion-header-active ui-state-active ui-corner-top" )
.addClass( "ui-corner-all" )
.children( ".ui-accordion-header-icon" )
.addClass( "ui-corner-all" );
if ( options.icons ) {
active.children( ".ui-accordion-header-icon" )
.removeClass( options.icons.activeHeader )
.addClass( options.icons.header );
}

if ( !clickedIsActive ) {
clicked
.removeClass( "ui-corner-all" )
.addClass( "ui-accordion-header-active ui-state-active ui-corner-top" )
.children( ".ui-accordion-header-icon" )
.addClass( "ui-accordion-header-active ui-state-active ui-corner-top" );
if ( options.icons ) {
clicked.children( ".ui-accordion-header-icon" )
.removeClass( options.icons.header )
.addClass( options.icons.activeHeader );
}

clicked
.next()
.addClass( "ui-accordion-content-active" );

0 comments on commit 7f533df

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