aboutsummaryrefslogtreecommitdiffstats
path: root/ui/ui.accordion.js
diff options
context:
space:
mode:
authorCa-Phun Ung <pazu2k@gmail.com>2008-09-25 18:50:11 +0000
committerCa-Phun Ung <pazu2k@gmail.com>2008-09-25 18:50:11 +0000
commita23a88a0ca513b2c04d41c43008d522ffcd34a7c (patch)
tree89b9cef4523e38cfdf47ab2db2cb23d816c523c4 /ui/ui.accordion.js
parentb5ce43ac6afa4b78b33164a10da4c6c12e83473a (diff)
downloadjquery-ui-a23a88a0ca513b2c04d41c43008d522ffcd34a7c.tar.gz
jquery-ui-a23a88a0ca513b2c04d41c43008d522ffcd34a7c.zip
Accordion: fixed jump in accordion when expander div has padding.
Diffstat (limited to 'ui/ui.accordion.js')
-rw-r--r--ui/ui.accordion.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/ui/ui.accordion.js b/ui/ui.accordion.js
index af9a3276a..45fe85b94 100644
--- a/ui/ui.accordion.js
+++ b/ui/ui.accordion.js
@@ -253,8 +253,9 @@ $.extend($.ui.accordion, {
}
var hideHeight = options.toHide.height(),
showHeight = options.toShow.height(),
- difference = showHeight / hideHeight;
- options.toShow.css({ height: 0, overflow: 'hidden' }).show();
+ difference = showHeight / hideHeight,
+ padding = options.toShow.outerHeight() - options.toShow.height();
+ options.toShow.css({ height: 0, overflow: 'hidden', marginBottom: -padding }).show();
options.toHide.filter(":hidden").each(options.complete).end().filter(":visible").animate({height:"hide"},{
step: function(now) {
var current = (hideHeight - now) * difference;
@@ -269,6 +270,7 @@ $.extend($.ui.accordion, {
if ( !options.autoHeight ) {
options.toShow.css("height", "auto");
}
+ options.toShow.css("marginBottom", 0);
options.complete();
}
});