EasyUI Forum

General Category => General Discussion => Topic started by: szsupernan on May 07, 2018, 09:10:53 PM



Title: How to change the panel title?
Post by: szsupernan 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


Title: Re: How to change the panel title?
Post by: stworthy 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.


Title: Re: How to change the panel title?
Post by: szsupernan 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.