r740 - trunk/ui
r740 - trunk/ui
Author: pazu2k@gmail.com
Date: Thu Sep 25 11:50:11 2008
New Revision: 740
Modified:
trunk/ui/ui.accordion.js
Log:
Accordion: fixed jump in accordion when expander div has padding.
Modified: trunk/ui/ui.accordion.js
==============================================================================
--- trunk/ui/ui.accordion.js (original)
+++ trunk/ui/ui.accordion.js Thu Sep 25 11:50:11 2008
@@ -253,8 +253,9 @@
}
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 @@
if ( !options.autoHeight ) {
options.toShow.css("height", "auto");
}
+ options.toShow.css("marginBottom", 0);
options.complete();
}
});