]> source.dussan.org Git - jquery-ui.git/commitdiff
accordion: partial fix for #4011
authorJörn Zaefferer <joern.zaefferer@gmail.com>
Fri, 30 Jan 2009 21:40:34 +0000 (21:40 +0000)
committerJörn Zaefferer <joern.zaefferer@gmail.com>
Fri, 30 Jan 2009 21:40:34 +0000 (21:40 +0000)
ui/ui.accordion.js

index 659cd4a5e37eb9f249e56205bd616cc0b5100958..d94e81b8fbd2cbe0659b94db49a46f7ccee382b3 100644 (file)
@@ -394,10 +394,7 @@ $.extend($.ui.accordion, {
                                options.toShow.animate({height: "show"}, options);
                                return;
                        }
-                       var hideHeight = options.toHide.height(),
-                               showHeight = options.toShow.height(),
-                               difference = showHeight / hideHeight,
-                               overflow = options.toShow.css('overflow'),
+                       var overflow = options.toShow.css('overflow'),
                                showProps = {},
                                hideProps = {},
                                fxAttrs = [ "height", "paddingTop", "paddingBottom" ];
@@ -405,6 +402,7 @@ $.extend($.ui.accordion, {
                                hideProps[prop] = 'hide';
                                showProps[prop] = parseFloat(options.toShow.css(prop));
                        });
+                       showProps.height = options.toShow.height();
                        options.toShow.css({ height: 0, overflow: 'hidden' }).show();
                        options.toHide.filter(":hidden").each(options.complete).end().filter(":visible").animate(hideProps,{
                                step: function(now, settings) {