EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: aswzen on July 16, 2014, 06:59:55 PM



Title: How to make the panel collapse when panel header/title clicked?
Post by: aswzen on July 16, 2014, 06:59:55 PM
How to make the panel collapse when panel header/title clicked?

How to do that?  :-\

thanks before... 


Title: Re: How to make the panel collapse when panel header/title clicked?
Post by: jarry on July 17, 2014, 05:42:12 PM
Call 'header' method of panel to get the panel header object, bind 'click' event on it. In the event handler, call 'collapse' method to collapse the panel.
Code:
$('#p').panel('header').click(function(){
$('#p').panel('collapse', true)
})