$(function () { $('#box').panel({ //id : 'pox', //自定义ID title : '面板', //控制面板头部 width : 500, height : 150, iconCls : 'icon-search', //头部加样式图标 //left : 100, //配合panel('panel') 使用 //top : 100, cls : 'a', //为整个面板添加一个样式 headerCls : 'b', //为头部添加一个样式 bodyCls : 'c', //为内容层添加一个样式 style : { //为面板添加css属性 'min-height' : '200px', }, //fit : true, //宽、高自适应父容器 //border : false, //是否显示边框 //doSize : false, //设置false,前前后后设置的全部属性都无效只显示默认状态 //noheader : true, //true,不显示标题 //content : '修改了', //修改面板内容 collapsible : true, //显示内容可折叠按钮 minimizable : true, //显示最小化按钮 maximizable : true, //显示最大化按钮 closable : true, //显示关闭按钮 //tools : '#tt', tools : [{ iconCls : 'icon-help', //添加以后的样式图标,图标都会显示到标题右边 handler : function () { //为添加的图标添加事件 alert('help'); }, },{ }], //collapsed : true, //初始界面折叠 //minimized : true, //初始界面最小化 //maximized : true, //初始界面最大化 //closed : true, //初始界面关闭 href : 'content.php', //ajax加载页面 loadingMessage : '加载中...', //ajax正在加载中显示的文字 extractor : function (data) { //过滤内容后在显示在内容中 return data.substring(0,3); }, onBeforeLoad : function () { //href属性加载远程页面之前触发 alert('远程加载之前触发!'); return false; //取消远程加载 }, onLoad : function () { //href属性加载远程页面之后触发 alert('远程加载之后触发!'); }, onBeforeOpen : function () { alert('内容展开之前触发!'); return false; //取消打开 }, onOpen : function () { alert('内容展开后前触发'); }, onBeforeClose : function () { alert('关闭之前触发!'); return false; //取消关闭 }, onClose : function () { alert('关闭之后触发!'); }, onBeforeDestroy : function () { alert('销毁之前触发!'); //return false; //取消销毁 }, onDestroy : function () { alert('销毁之后触发!'); }, onBeforeCollapse : function () { alert('折叠之前触发!'); //return false; //取消折叠 }, onCollapse : function () { alert('折叠之后触发!'); }, onBeforeExpand : function () { alert('展开之前触发!'); //return false; //取消展开 }, onExpand : function () { alert('展开之后触发!'); }, onMaximize : function () { alert('窗口最大化时触发!'); }, onRestore : function () { alert('窗口还原时触发!'); }, onMinimize : function () { alert('窗口最小化时触发!'); }, onResize : function (width, height) { alert(width + '|' + height); }, onMove : function (left, top) { alert(left + '|' + top); }, onBeforeOpen : function () { alert('打开之前触发!'); return false; //取消打开 }, }); //$('#box').panel('panel').css('position', 'absolute'); });