Skip to content
Permalink
Browse files

accordion: fix for #4754; related tests were failing before, fixed th…

…em, too (checked to correct sizes in Firebug)
  • Loading branch information
jzaefferer committed Aug 6, 2009
1 parent 20e6ef3 commit 425e76355a289341eb588874e04b82afdc9eeb99
Showing with 7 additions and 7 deletions.
  1. +6 −6 tests/unit/accordion/accordion_options.js
  2. +1 −1 ui/ui.accordion.js
@@ -55,16 +55,16 @@ test("{ animated: String }", function() {

test("{ autoHeight: true }, default", function() {
$('#navigation').accordion({ autoHeight: true });
equals( $('#navigation > li:eq(0) > ul').height(), 112 );
equals( $('#navigation > li:eq(1) > ul').height(), 112 );
equals( $('#navigation > li:eq(2) > ul').height(), 112 );
equals( $('#navigation > li:eq(0) > ul').height(), 126 );
equals( $('#navigation > li:eq(1) > ul').height(), 126 );
equals( $('#navigation > li:eq(2) > ul').height(), 126 );
});

test("{ autoHeight: false }", function() {
$('#navigation').accordion({ autoHeight: false });
equals( $('#navigation > li:eq(0) > ul').height(), 80 );
equals( $('#navigation > li:eq(1) > ul').height(), 112 );
equals( $('#navigation > li:eq(2) > ul').height(), 48 );
equals( $('#navigation > li:eq(0) > ul').height(), 90 );
equals( $('#navigation > li:eq(1) > ul').height(), 126 );
equals( $('#navigation > li:eq(2) > ul').height(), 54 );
});

test("{ clearStyle: false }, default", function() {
@@ -222,7 +222,7 @@ $.widget("ui.accordion", {
} else if ( o.autoHeight ) {
maxHeight = 0;
this.headers.next().each(function() {
maxHeight = Math.max(maxHeight, $(this).outerHeight());
maxHeight = Math.max(maxHeight, $(this).height());
}).height(maxHeight);
}

0 comments on commit 425e763

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