Accordion: Animate padding when only showing/hiding a single panel. Fixes #5540 - Accordion: Jumpy animation when opening a panel after closing all.

This commit is contained in:
Scott González 2010-07-14 08:29:58 -04:00
parent 21aad10e6a
commit e895d860a5

View File

@ -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'),