我正在使用一个名为slidepanel的jquery插件,它运行正常。我的问题是当面板滑出时我的主要内容与它重叠。 我想把身体放在整个窗口的中心 - 滑板宽度。
Slidepanel.prototype.expand = function() {
var base = this;
//set the css properties to animatate
var panel_options = {};
var body_options = {};
panel_options.visible = 'show';
panel_options[this.options.orientation] = 0;
body_options[this.options.orientation] = (this.options.orientation == 'top' || this.options.orientation == 'bottom') ? this.$panel.height() : 390;
//this.$panel.width()
//if the animation mode is set to push, we move the body in relation to the panel
//else the panel is overlayed on top of the body
if(this.options.mode == 'push'){
//animate the body position in relation to the panel dimensions
this.$body.css('position', 'absolute').animate(body_options, 250);
}
//animate the panel into view
this.$panel.addClass('loading').animate(panel_options, 250, function() {
//show the panel's close button
$('.close', base.$panel).fadeIn(250);
});
};
如果您能提供任何帮助,我们将不胜感激。