Permalink
Browse files

Accordion: Animate padding when only showing/hiding a single panel. F…

…ixes #5540 - Accordion: Jumpy animation when opening a panel after closing all.
1 parent 21aad10 commit e895d860a5b11e90bc97b1aa29e6f5ec5c147bc2 @scottgonzalez scottgonzalez committed Jul 14, 2010
Showing with 2 additions and 2 deletions.
  1. +2 −2 ui/jquery.ui.accordion.js
@@ -452,11 +452,11 @@ $.extend($.ui.accordion, {
duration: 300
}, options, additions);
if ( !options.toHide.size() ) {
- options.toShow.animate({height: "show"}, options);
+ options.toShow.animate({height: "show", paddingTop: "show", paddingBottom: "show"}, options);
return;
}
if ( !options.toShow.size() ) {
- options.toHide.animate({height: "hide"}, options);
+ options.toHide.animate({height: "hide", paddingTop: "hide", paddingBottom: "hide"}, options);
return;
}
var overflow = options.toShow.css('overflow'),

0 comments on commit e895d86

Please sign in to comment.