fix collapsepanel

This commit is contained in:
rlx 2012-01-02 14:25:04 +00:00
parent 038493d52b
commit 0c6541363d

View file

@ -73,7 +73,7 @@ Ox.CollapsePanel = function(options, self) {
if (self.options.collapsed) {
that.$content.css({
marginTop: -that.$content.height() + 'px'
});
}).hide();
}
function doubleclickTitlebar(e) {
@ -88,12 +88,9 @@ Ox.CollapsePanel = function(options, self) {
var marginTop;
self.options.collapsed = !self.options.collapsed;
marginTop = self.options.collapsed ? -that.$content.height() : 0;
if (!self.options.collapsed) {
that.css({
marginTop: -that.$content.height() + 'px'
});
that.$content.show();
}
!self.options.collapsed && that.$content.css({
marginTop: -that.$content.height() + 'px'
}).show();
that.$content.animate({
marginTop: marginTop + 'px'
}, 250, function() {