Working with multiple pages in jQuery Mobile is pretty simple. You could take what's been discussed in the first two chapters and build a pretty simple, but mobile-compliant, website right now. The following are a few more interesting tricks you may want to consider.
You may have noticed that when you clicked on the Products page in the previous example, the title of the browser correctly updated to Products. This is because jQuery Mobile noticed, and parsed in, the
title tag from the
products.html file. If you click on the learn more link, you will notice that the title is also updated. How did this work? When
aboutPage was loaded, jQuery Mobile used the
header tag's content (All About Megacorp) for a title. You can override this by providing an additional argument to your
div tag defining your page:
data-title. The following snippet demonstrates this feature:
<div data-role="page" id="aboutPage" data-title="All About Megacorp"> <div data-role...