EasyUI Forum
November 03, 2025, 10:24:04 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: how to create invisible panels  (Read 8358 times)
JeroenNL
Newbie
*
Posts: 37


View Profile
« on: July 06, 2014, 08:09:05 AM »

Hello,

I'm using easyui-layout with north and center panels to create a complex page. I want the north panel to be completely invisible until some condition is met and then make it visible. It shouldn't have a title and it shouldn't show the collapsed bar. It also should not take up any space when it is invisible. The center panel should take up all space in that case.

How can I accomplish that?

Cheers,
Jeroen
Logged
jarry
Administrator
Hero Member
*****
Posts: 2300


View Profile Email
« Reply #1 on: July 06, 2014, 07:17:17 PM »

Set 'collapsed' property to true for the north panel. When the north panel is collapsed, get the corresponding 'expandNorth' panel and close it. Finally call 'resize' method to resize the layout.
Code:
<div id="layout" class="easyui-layout" style="width:700px;height:350px;">
<div style="height:150px" data-options="
region:'north',
collapsed:true,
onCollapse:function(){
setTimeout(function(){
var p = $('#layout').layout('panel','expandNorth');
p.panel('close')
$('#layout').layout('resize')
},0)
}"></div>
<div data-options="region:'center'"></div>
</div>
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!