I have a jQuery Mobile app that's just like the dynamic page sample from the jQuery Mobile documentation http://jquerymobile.com/test/docs/pages/dynamic-samples/sample-reuse-page.html.
Everything works fine, but just as in the example I can't get the page titles to change accordingly to the requested page. On the basis of the example: When you click the category Colors in the Categories section, the new page has the title Colors, but when you go back and then select Vehicles, the page title is still Colors. How can I fix this?
I tried $page.attr('data-title', category.name)
in the showCategory
function but it won't work. Any ideas?