Skip to content

Commit e895d86

Browse files
committed
Accordion: Animate padding when only showing/hiding a single panel. Fixes #5540 - Accordion: Jumpy animation when opening a panel after closing all.
1 parent 21aad10 commit e895d86

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ui/jquery.ui.accordion.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -452,11 +452,11 @@ $.extend($.ui.accordion, {
452452
duration: 300
453453
}, options, additions);
454454
if ( !options.toHide.size() ) {
455-
options.toShow.animate({height: "show"}, options);
455+
options.toShow.animate({height: "show", paddingTop: "show", paddingBottom: "show"}, options);
456456
return;
457457
}
458458
if ( !options.toShow.size() ) {
459-
options.toHide.animate({height: "hide"}, options);
459+
options.toHide.animate({height: "hide", paddingTop: "hide", paddingBottom: "hide"}, options);
460460
return;
461461
}
462462
var overflow = options.toShow.css('overflow'),

0 commit comments

Comments
 (0)