]> source.dussan.org Git - jquery-ui.git/commitdiff
Accordion: Animate padding when only showing/hiding a single panel. Fixes #5540 ...
authorScott González <scott.gonzalez@gmail.com>
Wed, 14 Jul 2010 12:29:58 +0000 (08:29 -0400)
committerScott González <scott.gonzalez@gmail.com>
Wed, 14 Jul 2010 12:29:58 +0000 (08:29 -0400)
ui/jquery.ui.accordion.js

index 286df77a655b6b90416a38e85cf96ccf0eee484c..8699f8e12f43bd990b972569ff82d024159446ae 100644 (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'),