r3049 committed - accordion: Fix for #4695, refactored

r3049 committed - accordion: Fix for #4695, refactored


Revision: 3049
Author: joern.zaefferer
Date: Tue Aug 11 12:08:23 2009
Log: accordion: Fix for #4695, refactored
http://code.google.com/p/jquery-ui/source/detail?r=3049
Modified:
/trunk/ui/ui.accordion.js
=======================================
--- /trunk/ui/ui.accordion.js    Tue Aug 11 11:58:03 2009
+++ /trunk/ui/ui.accordion.js    Tue Aug 11 12:08:23 2009
@@ -217,8 +217,7 @@
            });
            this.headers.next().each(function() {
-                var padding = $(this).innerHeight() - $(this).height();
-          $(this).height(Math.max(0, maxHeight - padding));
+          $(this).height(Math.max(0, maxHeight - $(this).innerHeight() +
$(this).height()));
            }).css('overflow', 'auto');
        } else if ( o.autoHeight ) {