EasyUI Forum
May 10, 2024, 10:34:26 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: What is the proper way to update a panel's properties?  (Read 11177 times)
tslatt
Jr. Member
**
Posts: 85



View Profile
« on: November 23, 2011, 09:04:47 AM »

Here's an easy question for once (I hope):

I've seen both of these methods, but I'm not sure which is the right way to update a panel's properties. If I want to collapse (or expand, close, open, maximize, restore) a panel, which of these lines of code is the proper way to do it? And what is the difference between the two?

Code:
$("#p").panel({ collapsed: true });
$("#p").panel("collapse");
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: November 23, 2011, 06:21:24 PM »

Call $('#p').panel({...}) will recreate the panel.
Call $('#p').panel(methodname, parameter) will perform action on the panel existed.
Logged
tslatt
Jr. Member
**
Posts: 85



View Profile
« Reply #2 on: November 29, 2011, 09:34:51 AM »

OK, that makes sense. Thanks!
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!