Skip to content
Permalink
Browse files

Accordion: Update active option when programmatically collapsing the …

…accordion.
  • Loading branch information
scottgonzalez committed Feb 3, 2011
1 parent d099e3a commit 2e17770e5466fa41018cdd53a7bf999b162ce07a
Showing with 4 additions and 4 deletions.
  1. +3 −4 tests/unit/accordion/accordion_options.js
  2. +1 −0 ui/jquery.ui.accordion.js
@@ -92,10 +92,9 @@ test( "{ collapsible: true }", function() {
collapsible: true
});

// TODO: fix setting active to false
// ac.accordion( "option", "active", false );
// equal( ac.accordion( "option", "active" ), false );
// state( ac, 0, 0, 0 );
ac.accordion( "option", "active", false );
equal( ac.accordion( "option", "active" ), false );
state( ac, 0, 0, 0 );

ac.accordion( "option", "active", 1 );
equal( ac.accordion( "option", "active" ), 1 );
@@ -285,6 +285,7 @@ $.widget( "ui.accordion", {
return;
}

this.options.active = false;
this.active
.removeClass( "ui-state-active ui-corner-top" )
.addClass( "ui-state-default ui-corner-all" )

0 comments on commit 2e17770

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