EasyUI Forum
April 30, 2024, 01:29:09 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: Show title of a collapsed layout panel  (Read 9986 times)
kudoof
Newbie
*
Posts: 21


View Profile
« on: October 24, 2013, 02:12:07 PM »

The panel was initialized as collapsed='true',  but the title is not showing up in the title bar area (only empty space that does not give a clue what it might be). 
Code:
  <div data-options="region:'north', split:true" title="Edit Your information" style="height:180px" collapsed="true">

I tried the code from another thread as the following:

Code:
var p = $('#maincontainer').layout('panel','north').panel({
onCollapse:function(){
var title = $('#maincontainer').layout('panel','north').panel('options').title;  // get the north panel title
var p = $('#maincontainer').data('layout').panels['expandNorth'];  // the north expand panel
p.html('<div>'+title+'</div>');
}
});

but it did not work even after the page loaded. 
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: October 24, 2013, 05:48:40 PM »

Try this.
Code:
<div id="maincontainer" class="easyui-layout" style="width:800px;height:400px">
<div region="north" title="MyTitle" style="height:100px" data-options="
collapsed:true,
onCollapse:function(){
setTimeout(function(){
var p = $('#maincontainer').layout('panel','expandNorth');
p.panel('setTitle','MyTitle');
},0);
}
">
</div>
<div region="center"></div>
</div>
Logged
arma
Full Member
***
Posts: 110


View Profile
« Reply #2 on: February 03, 2014, 12:03:05 AM »

Ah thanks, that works good  Grin
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!