mirror of
https://github.com/jquery/jquery-ui.git
synced 2025-01-07 20:34:24 +00:00
accordion: fix for #4754; related tests were failing before, fixed them, too (checked to correct sizes in Firebug)
This commit is contained in:
parent
20e6ef30a7
commit
425e76355a
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user