This is a migrated thread and some comments may be shown as answers.

manually change navbar title

3 Answers 253 Views
NavBar
This is a migrated thread and some comments may be shown as answers.
Ahmad
Top achievements
Rank 1
Ahmad asked on 06 Jul 2012, 12:37 PM
Hi

I'm calling a function everytime user switch to a new view (using "data-show") part of the function is to change the title based on user input

my problem is that even when I change the title using jquery with the title span id, I can see Kendo will reset it back to data-title


Note: I'm changing the title using :
$('#view-title').html(q);
$('#view-search').attr('data-title',q);

3 Answers, 1 is accepted

Sort by
0
Iliana Dyankova
Telerik team
answered on 11 Jul 2012, 10:09 AM
Hi Ahmad,

I have replied to your support ticket on the same subject, however I am pasting my reply here as well: 

I am not sure if I understand your scenario correctly. Could you please provide more detailed information and preferably a sample runnable project that replicates the problem? Thus way I would be able to investigate your case in details and do my best to provide you with an accurate solution. Thank you in advance.   
 

Regards,
Iliana Nikolova
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Josh
Top achievements
Rank 1
answered on 09 Aug 2012, 08:04 PM
If you are trying to change the header of a mobile view  (data-role="header"):

Using jquery to change any html content within the header will not work.


I was able to do it by referencing the header from the view object itself:

$(view.header[0]).find("selector").html("CUSTOM TEXT HERE");

where

view = the mobile view you are trying to change
0
Josh
Top achievements
Rank 1
answered on 22 Aug 2012, 06:07 PM
In addition to the method I outlined above, if you remove the HTML element that has the content you want to change then set it back using jquery HTML it works as well.
Tags
NavBar
Asked by
Ahmad
Top achievements
Rank 1
Answers by
Iliana Dyankova
Telerik team
Josh
Top achievements
Rank 1
Share this question
or