EasyUI Forum
June 15, 2024, 03:51: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: How to make the panel collapse when panel header/title clicked?  (Read 5759 times)
aswzen
Sr. Member
****
Posts: 287


Indonesian

aswzen
View Profile WWW Email
« on: July 16, 2014, 06:59:55 PM »

How to make the panel collapse when panel header/title clicked?

How to do that?  Undecided

thanks before... 
Logged

Regards,
Sigit

- Indonesian jEasyUI Facebook page : https://www.facebook.com/groups/jeasyuiid/
jarry
Administrator
Hero Member
*****
Posts: 2265


View Profile Email
« Reply #1 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)
})
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!