Skip to content
Permalink
Browse files

accordion: reset overflow to original value after animation completed…

…, fixes some layout issues
  • Loading branch information...
jzaefferer committed Oct 13, 2008
1 parent 4416773 commit e24e2aeb7b7a0735264c74352f945634e4beee81
Showing with 2 additions and 1 deletion.
  1. +2 −1 ui/ui.accordion.js
@@ -293,6 +293,7 @@ $.extend($.ui.accordion, {
difference = showHeight / hideHeight,
padding = options.toShow.outerHeight() - options.toShow.height(),
margin = options.toShow.css('marginBottom'),
overflow = options.toShow.css('overflow')
tmargin = options.toShow.css('marginTop');
options.toShow.css({ height: 0, overflow: 'hidden', marginTop: 0, marginBottom: -padding }).show();
options.toHide.filter(":hidden").each(options.complete).end().filter(":visible").animate({height:"hide"},{
@@ -309,7 +310,7 @@ $.extend($.ui.accordion, {
if ( !options.autoHeight ) {
options.toShow.css("height", "auto");
}
options.toShow.css({marginTop: tmargin, marginBottom: margin});
options.toShow.css({marginTop: tmargin, marginBottom: margin, overflow: overflow});
options.complete();
}
});

0 comments on commit e24e2ae

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