EasyUI Forum
April 18, 2024, 01:37:57 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 change the panel title?  (Read 6255 times)
szsupernan
Newbie
*
Posts: 2


View Profile Email
« on: May 07, 2018, 09:10:53 PM »

hi guys,
There are two ways to change the title of panel control.
1)
$("#aaa").panel('setTitle', 'new title');

2)
$("#aaa").panel({title: 'new title'}).

are there any differences? I prefer 2, but is the 1 correct way?

Thanks
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: May 07, 2018, 11:27:13 PM »

The first one only change the panel's title. The second one recreate the whole panel with a different title. If you only want to change the panel's title, please call 'setTitle' method instead.
Logged
szsupernan
Newbie
*
Posts: 2


View Profile Email
« Reply #2 on: May 10, 2018, 11:50:11 PM »

The first one only change the panel's title. The second one recreate the whole panel with a different title. If you only want to change the panel's title, please call 'setTitle' method instead.

good answer, thank you very much.
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!