Leon Cunningham
Posts: 0
Joined: Sun Jul 13, 2014 7:50 pm

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

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?

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

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

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.

Return to “Issues”