function add(){
$('#add').panel({
width:500,
height:150,
title:'My Panel',
closable:true,
tools:[{
iconCls:'icon-remove',
handler:function(){}
},{
iconCls:'icon-save',
handler:function(){alert('save')}
}]
});
}
定義了一個按鈕,點擊就會打開面板,面板設定有關閉功能,但是關閉後在點按鈕卻打不開,求大神解救,謝謝
沒有問題,你怎麼搞的?打開要調用open方法,不是在執行panel方法初始化對象
<div style="margin:20px 0 10px 0;">
<a href="#" class="easyui-linkbutton" onclick="javascript:$('#p').panel('open')">Open</a>
<a href="#" class="easyui-linkbutton" onclick="javascript:$('#p').panel('close')">Close</a>
</div>
<div id="p" class="easyui-panel" title="Basic Panel" style="width:700px;height:200px;padding:10px;" data-options="closable:true">
<p style="font-size:14px">jQuery EasyUI framework helps you build your web pages easily.</p>
<ul>
<li>easyui is a collection of user-interface plugin based on jQuery.</li>
<li>easyui provides essential functionality for building modem, interactive, javascript applications.</li>
<li>using easyui you don't need to write many javascript code, you usually defines user-interface by writing some HTML markup.</li>
<li>complete framework for HTML5 web page.</li>
<li>easyui save your time and scales while developing your products.</li>
<li>easyui is very easy but powerful.</li>
</ul>
</div>