EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: devnull on January 03, 2015, 09:53:27 PM



Title: Panel Collapse
Post by: devnull on January 03, 2015, 09:53:27 PM
If I call the collapse() method, the content in the panel disappears but the panel does not collapse.

Code:
$('body #west').panel('collapse');

But If I trigger a click on the collapse button, then the panel does collapse:

Code:
$('body .panel-tool a.layout-button-left').trigger('click');




Title: Re: Panel Collapse
Post by: stworthy on January 04, 2015, 12:19:00 AM
Please call layout's 'collapse' method instead.
Code:
$('body').layout('collapse', 'west');


Title: Re: Panel Collapse
Post by: devnull on January 04, 2015, 12:28:52 AM
Thanks, following on from that, i see there is an animate option, I have tried all of these but none appear to work:

Code:
$('body').layout('collapse', 'west','animate');
$('body').layout('collapse', 'west',true);
$('body').layout('collapse', 'west','slide');
$('body').layout('collapse', 'west',500);

The panel just collapses immediately with no animations.


Title: Re: Panel Collapse
Post by: stworthy on January 04, 2015, 01:15:04 AM
Only the 'slide' animation is supported when collapsing or expanding a region panel.


Title: Re: Panel Collapse
Post by: finzaiko on June 30, 2015, 11:47:43 PM
How can I collapse layout panel onClick, I try like this
Code:
function hideEastPanel(){
$('body').layout('collapse', 'east');
}
found error :
var _346=$.data(_343,"layout").panels;

my layout panel inside IFRAME

Thanks in advance.