EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: nyr_jack on September 26, 2012, 08:04:47 PM



Title: About attributes of panel
Post by: nyr_jack on September 26, 2012, 08:04:47 PM
<script>
function showPanel(){
//here to write if codes,
//to judge the value of closed, if closed == false then close the panel, else open.
}
</script>
<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-edit'" onclick="showPanel();">show panel</a>

<div id="p" class="easyui-panel" data-options="border:false,closed:true"></div>

So, I want to know how to get boolean value of "closed".

Please help!


Title: Re: About attributes of panel
Post by: stworthy on September 27, 2012, 12:11:41 AM
Code:
var p = $('#p');
if (p.panel('options').closed){
p.panel('open');
} else {
p.panel('close');
}


Title: Re: About attributes of panel
Post by: nyr_jack on September 27, 2012, 02:29:04 AM
 :-*