Page 1 of 1

How do I change the Text of the Header and back button on the header with javascript code?

Posted: Sun Jul 13, 2014 7:50 pm
by Leon Cunningham

Hello I want to change the Header text to the title of the content being displayed and change the text of the back button to the id # of the content. How can I do this with page load javascript?


How do I change the Text of the Header and back button on the header with javascript code?

Posted: Sun Jul 13, 2014 10:04 pm
by Yurii Orishchuk

Hi Leon,

Please use following JS code:

pre

//To change active page header text.
jQuery('[name="mobileheader"]:visible .ui-title').text("New header text");

//To change active page back button text.
jQuery('[name="mobileheader"]:visible .ui-toolbar-back-btn').text("New button text");

/pre

Regards.