Skip to content

Commit

Permalink
accordion: reset overflow to original value after animation completed…
Browse files Browse the repository at this point in the history
…, fixes some layout issues
  • Loading branch information
jzaefferer committed Oct 13, 2008
1 parent 4416773 commit e24e2ae
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ui/ui.accordion.js
Expand Up @@ -293,6 +293,7 @@ $.extend($.ui.accordion, {
difference = showHeight / hideHeight, difference = showHeight / hideHeight,
padding = options.toShow.outerHeight() - options.toShow.height(), padding = options.toShow.outerHeight() - options.toShow.height(),
margin = options.toShow.css('marginBottom'), margin = options.toShow.css('marginBottom'),
overflow = options.toShow.css('overflow')
tmargin = options.toShow.css('marginTop'); tmargin = options.toShow.css('marginTop');
options.toShow.css({ height: 0, overflow: 'hidden', marginTop: 0, marginBottom: -padding }).show(); 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"},{ options.toHide.filter(":hidden").each(options.complete).end().filter(":visible").animate({height:"hide"},{
Expand All @@ -309,7 +310,7 @@ $.extend($.ui.accordion, {
if ( !options.autoHeight ) { if ( !options.autoHeight ) {
options.toShow.css("height", "auto"); options.toShow.css("height", "auto");
} }
options.toShow.css({marginTop: tmargin, marginBottom: margin}); options.toShow.css({marginTop: tmargin, marginBottom: margin, overflow: overflow});
options.complete(); options.complete();
} }
}); });
Expand Down

0 comments on commit e24e2ae

Please sign in to comment.