fix collapsepanel
This commit is contained in:
parent
be06c433d1
commit
038493d52b
1 changed files with 7 additions and 4 deletions
|
@ -88,13 +88,16 @@ Ox.CollapsePanel = function(options, self) {
|
||||||
var marginTop;
|
var marginTop;
|
||||||
self.options.collapsed = !self.options.collapsed;
|
self.options.collapsed = !self.options.collapsed;
|
||||||
marginTop = self.options.collapsed ? -that.$content.height() : 0;
|
marginTop = self.options.collapsed ? -that.$content.height() : 0;
|
||||||
!self.options.collapsed && that.css({
|
if (!self.options.collapsed) {
|
||||||
|
that.css({
|
||||||
marginTop: -that.$content.height() + 'px'
|
marginTop: -that.$content.height() + 'px'
|
||||||
}).show();
|
});
|
||||||
|
that.$content.show();
|
||||||
|
}
|
||||||
that.$content.animate({
|
that.$content.animate({
|
||||||
marginTop: marginTop + 'px'
|
marginTop: marginTop + 'px'
|
||||||
}, 250, function() {
|
}, 250, function() {
|
||||||
self.options.collapsed && that.hide();
|
self.options.collapsed && that.$content.hide();
|
||||||
});
|
});
|
||||||
that.triggerEvent('toggle', {
|
that.triggerEvent('toggle', {
|
||||||
collapsed: self.options.collapsed
|
collapsed: self.options.collapsed
|
||||||
|
|
Loading…
Reference in a new issue