O'Reilly logo

Pro jQuery Mobile by Brad Broulik

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Multi-Page Template

jQuery Mobile supports the ability to embed multiple pages within a single HTML document as shown in Listing 2–3. This strategy can be used to prefetch multiple pages up front and achieve quicker response times when loading sub-pages. As you can see in the example below, the multi-page document is identical to the single-page template we saw earlier except a second page has been appended after the first page. The multi-page specific details are highlighted and discussed below.

Listing 2–3. Multi-Page Template (ch2/multi-page.html)

<head>   <meta charset="utf-8">   <title>Multi Page Example</title>   <meta name="viewport" content="width=device-width, initial-scale=1">   <link rel="stylesheet" type="text/css" href="jquery.mobile-min.css" ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required